Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,10 @@ private void checkCapability(OCCapability capability, String userId) {

// support
assertTrue(capability.getHasValidSubscription().isFalse());

// wcf
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_32)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New flag only available after nextcloud_32

assertTrue(capability.isWCFEnabled().isFalse());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
private static final String FORBIDDEN_FILENAME_EXTENSIONS = "forbidden_filename_extensions";
private static final String FORBIDDEN_FILENAME_BASE_NAMES = "forbidden_filename_basenames";

private static final String WINDOWS_COMPATIBLE_FILENAMES = "windows_compatible_filenames";

// files download limits
private static final String NODE_FILES_DOWNLOAD_LIMIT = "downloadlimit";
private static final String FILES_DOWNLOAD_LIMIT_DEFAULT = "default-limit";
Expand Down Expand Up @@ -486,6 +488,11 @@ private OCCapability parseResponse(String response) throws JSONException {
JSONArray result = respFiles.getJSONArray(FORBIDDEN_FILENAME_BASE_NAMES);
capability.setForbiddenFilenameBaseNamesJson(result.toString());
}

if (respFiles.has(WINDOWS_COMPATIBLE_FILENAMES)) {
capability.setWCFEnabled(CapabilityBooleanType.fromBooleanValue(
respFiles.getBoolean(WINDOWS_COMPATIBLE_FILENAMES)));
}
// endregion

Log_OC.d(TAG, "*** Added " + NODE_FILES);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class OCCapability {
var forbiddenFilenamesJson: String? = null
var forbiddenFilenameExtensionJson: String? = null
var forbiddenFilenameBaseNamesJson: String? = null
var isWCFEnabled = CapabilityBooleanType.UNKNOWN

// files download limits
var filesDownloadLimit = CapabilityBooleanType.UNKNOWN
Expand Down
Loading