File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -137,18 +137,19 @@ - (BOOL) indexChanged {
137
137
138
138
- (BOOL ) gitDirectoryChanged {
139
139
140
- for (NSURL * fileURL in [[NSFileManager defaultManager ] contentsOfDirectoryAtURL: repository.gitURL
141
- includingPropertiesForKeys: [NSArray arrayWithObject: NSURLContentModificationDateKey ]
142
- options: 0
143
-
144
- error: nil ])
140
+ NSArray *properties = @[NSURLIsDirectoryKey , NSURLContentModificationDateKey ];
141
+ NSArray <NSURL *> *urls = [[NSFileManager defaultManager ] contentsOfDirectoryAtURL: self .repository.gitURL
142
+ includingPropertiesForKeys: properties
143
+ options: 0
144
+ error: nil ];
145
+ for (NSURL *fileURL in urls)
145
146
{
146
- BOOL isDirectory = NO ;
147
- [[NSFileManager defaultManager ] fileExistsAtPath: [fileURL path ] isDirectory: &isDirectory];
148
- if (isDirectory)
147
+ NSNumber *number = nil ;
148
+ if (![fileURL getResourceValue: &number forKey: NSURLIsDirectoryKey error: nil ] || [number boolValue ]) {
149
149
continue ;
150
+ }
150
151
151
- NSDate * modTime = nil ;
152
+ NSDate * modTime = nil ;
152
153
if (![fileURL getResourceValue: &modTime forKey: NSURLContentModificationDateKey error: nil ])
153
154
continue ;
154
155
You can’t perform that action at this time.
0 commit comments