mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Use the same fileSystemRepresentation function for both parts of the path
This commit is contained in:
1 parent
0a869e87bf
commit
ed16c5c2a0
1 file changed
+5
-2
Vendored
+5
-2
@@ -163,6 +163,9 @@ NSString *hashOfTreeWithVersion(NSString *path, uint16_t majorVersion)
|
||||
CC_SHA1_CTX hashContext;
|
||||
CC_SHA1_Init(&hashContext);
|
||||
|
||||
// Ensure the path uses filesystem-specific Unicode normalization #1017
|
||||
NSString *normalizedPath = stringWithFileSystemRepresentation(pathBuffer);
|
||||
|
||||
FTSENT *ent = 0;
|
||||
while ((ent = fts_read(fts))) {
|
||||
if (ent->fts_info != FTS_F && ent->fts_info != FTS_SL && ent->fts_info != FTS_D)
|
||||
@@ -171,8 +174,8 @@ NSString *hashOfTreeWithVersion(NSString *path, uint16_t majorVersion)
|
||||
if (ent->fts_info == FTS_D && !MAJOR_VERSION_IS_AT_LEAST(majorVersion, SUBeigeMajorVersion)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
NSString *relativePath = pathRelativeToDirectory(path, stringWithFileSystemRepresentation(ent->fts_path));
|
||||
|
||||
NSString *relativePath = pathRelativeToDirectory(normalizedPath, stringWithFileSystemRepresentation(ent->fts_path));
|
||||
if (relativePath.length == 0)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in new issue
Block a user