Skip to content

Commit

Permalink
Extract default property. Fix #15621.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Apr 28, 2024
1 parent e8bbe75 commit 1fcaaf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions defaults/src/main/resources/default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ webdav.microsoftiis.header.translate=true
webdav.list.handler.sax=true
webdav.lock.enable=true
webdav.listing.chunksize=20
nextcloud.root.default=/remote.php/dav
owncloud.root.default=/remote.php/dav

smb.domain.default=WORKGROUP
# Enable distributed filesystem path resolver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import ch.cyberduck.core.Host;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.preferences.HostPreferences;
import ch.cyberduck.core.shared.AbstractHomeFeature;

import org.apache.commons.lang3.StringUtils;
Expand All @@ -32,7 +33,7 @@ public class NextcloudHomeFeature extends AbstractHomeFeature {
private final String root;

public NextcloudHomeFeature(final Host bookmark) {
this(bookmark, "remote.php/dav");
this(bookmark, new HostPreferences(bookmark).getProperty("nextcloud.root.default"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import ch.cyberduck.core.Host;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.nextcloud.NextcloudHomeFeature;
import ch.cyberduck.core.preferences.HostPreferences;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -30,7 +31,7 @@ public class OwncloudHomeFeature extends NextcloudHomeFeature {
private final String root;

public OwncloudHomeFeature(final Host bookmark) {
this(bookmark, "remote.php/dav");
this(bookmark, new HostPreferences(bookmark).getProperty("owncloud.root.default"));
}

public OwncloudHomeFeature(final Host bookmark, final String root) {
Expand Down

0 comments on commit 1fcaaf2

Please sign in to comment.