Skip to content
Permalink
Browse files

(LoopbackFS) Add support for case insensitive file systems

LoopbackFS detects if the backing storage supports case sensitive names
and disables the feature in case it is unsupported.

This requires FUSE for OS X 2.7.1 or newer.
  • Loading branch information...
bfleischer committed Sep 14, 2014
1 parent 1c5190d commit 089a847dc3ac12ea96f0bc6fd7f5d63b74da69e4
Showing with 12 additions and 0 deletions.
  1. +12 −0 filesystems-objc/LoopbackFS/LoopbackFS.m
@@ -259,6 +259,18 @@ - (NSDictionary *)attributesOfFileSystemForPath:(NSString *)path
NSMutableDictionary* attribs = [NSMutableDictionary dictionaryWithDictionary:d];
[attribs setObject:[NSNumber numberWithBool:YES]
forKey:kGMUserFileSystemVolumeSupportsExtendedDatesKey];

NSURL *URL = [NSURL fileURLWithPath:p isDirectory:YES];
NSNumber *supportsCaseSensitiveNames = nil;
[URL getResourceValue:&supportsCaseSensitiveNames
forKey:NSURLVolumeSupportsCaseSensitiveNamesKey
error:NULL];
if (supportsCaseSensitiveNames == nil) {
supportsCaseSensitiveNames = [NSNumber numberWithBool:YES];
}
[attribs setObject:supportsCaseSensitiveNames
forKey:kGMUserFileSystemVolumeSupportsCaseSensitiveNamesKey];

return attribs;
}
return nil;

0 comments on commit 089a847

Please sign in to comment.
You can’t perform that action at this time.