Skip to content

Commit

Permalink
By default always set to change permissions after edit. Add hidden pr…
Browse files Browse the repository at this point in the history
…operty editor.upload.permissions.change.

Former-commit-id: 25eb36ea95dbc101a16ddc8a4264957a39a4fb68
  • Loading branch information
dkocher committed Nov 1, 2013
1 parent 9abf751 commit e1de1ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions source/ch/cyberduck/core/Preferences.java
Expand Up @@ -341,6 +341,7 @@ protected void setDefaults() {

defaults.put("editor.odb.enable", String.valueOf(false));
defaults.put("editor.upload.temporary", String.valueOf(true));
defaults.put("editor.upload.permissions.change", String.valueOf(true));

defaults.put("filetype.text.regex",
".*\\.txt|.*\\.cgi|.*\\.htm|.*\\.html|.*\\.shtml|.*\\.xml|.*\\.xsl|.*\\.php|.*\\.php3|" +
Expand Down
7 changes: 3 additions & 4 deletions source/ch/cyberduck/core/editor/AbstractEditor.java
Expand Up @@ -239,10 +239,9 @@ public TransferAction action(final Session<?> session, final boolean resumeReque

@Override
public AbstractUploadFilter filter(final Session<?> session, final TransferAction action) {
final AbstractUploadFilter filter = super.filter(session, action);
filter.setOptions(new UploadFilterOptions().withTemporary(
Preferences.instance().getBoolean("editor.upload.temporary")));
return filter;
return super.filter(session, action).withOptions(new UploadFilterOptions()
.withTemporary(Preferences.instance().getBoolean("editor.upload.temporary"))
.withPermission(Preferences.instance().getBoolean("editor.upload.permissions.change")));
}
};
final SingleTransferWorker worker
Expand Down
Expand Up @@ -77,8 +77,9 @@ public AbstractUploadFilter(final SymlinkResolver symlinkResolver, final Session
this.attribute = session.getFeature(Attributes.class).withCache(cache);
}

public void setOptions(final UploadFilterOptions options) {
public AbstractUploadFilter withOptions(final UploadFilterOptions options) {
this.options = options;
return this;
}

@Override
Expand Down

0 comments on commit e1de1ad

Please sign in to comment.