Skip to content

Commit 5f36103

Browse files
[fix/drive-id-format] Support for additional Drive ID formats (#1577)
* - ios-sdk: update to commit of PR ios-sdk#fix/drive-id-format - NSURL+OCVaultTools: replace implementation with call to new, identically-working NSURL method added by category in ios-sdk * - update ios-sdk * - update SDK * - ios-sdk update
1 parent 9246583 commit 5f36103

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

‎ownCloudAppFramework/Foundation Extensions/NSURL+OCVaultTools.m‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,7 @@ @implementation NSURL (OCVaultTools)
2323

2424
- (BOOL)isLocatedWithinVaultStorage
2525
{
26-
if (!self.isFileURL)
27-
{
28-
return (NO);
29-
}
30-
31-
NSString *vaultRootPath = OCVault.storageRootURL.path;
32-
NSString *path = self.path;
33-
34-
if (vaultRootPath == nil)
35-
{
36-
return (NO);
37-
}
38-
39-
if (![vaultRootPath hasSuffix:@"/"])
40-
{
41-
vaultRootPath = [vaultRootPath stringByAppendingString:@"/"];
42-
}
43-
44-
return ([path hasPrefix:vaultRootPath]);
26+
return ([self isLocatedWithin:OCVault.storageRootURL standardizeParent:NO]); // OCVault.storageRootURL is already standardized
4527
}
4628

4729
- (BOOL)isLocalFile

0 commit comments

Comments
 (0)