Skip to content

Commit

Permalink
Add base names
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 authored and tobiasKaminsky committed Aug 20, 2024
1 parent 6a41a52 commit 88f64a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
private static final String FORBIDDEN_FILENAME_CHARACTERS = "forbidden_filename_characters";
private static final String FORBIDDEN_FILENAMES = "forbidden_filenames";
private static final String FORBIDDEN_FILENAME_EXTENSIONS = "forbidden_filename_extensions";
private static final String FORBIDDEN_FILENAME_BASE_NAMES = "forbidden_filename_basenames";

private OCCapability currentCapability = null;

Expand Down Expand Up @@ -458,6 +459,11 @@ private OCCapability parseResponse(String response) throws JSONException {
JSONArray result = respFiles.getJSONArray(FORBIDDEN_FILENAME_EXTENSIONS);
capability.setForbiddenFilenameExtensionJson(result.toString());
}

if (respFiles.has(FORBIDDEN_FILENAME_BASE_NAMES)) {
JSONArray result = respFiles.getJSONArray(FORBIDDEN_FILENAME_BASE_NAMES);
capability.setForbiddenFilenameBaseNames(result.toString());
}
// endregion

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

// Etag for capabilities
var etag: String? = ""
Expand Down

0 comments on commit 88f64a5

Please sign in to comment.