Kaydet (Commit) dbab3b56 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Only list documents directly in NSDocumentDirectory

Change-Id: Ibaaa9ce5e5469b960d2b3dee1d40c536e5ae0739
üst f8d99287
......@@ -41,8 +41,16 @@
[documents addObject:test1];
while ((document = [dirEnumerator nextObject])) {
nDocs++;
[documents addObject:[documentsDirectory stringByAppendingPathComponent:document]];
NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:document];
BOOL isDirectory;
if ([fileManager fileExistsAtPath:fullPath isDirectory:&isDirectory]) {
if (isDirectory)
[dirEnumerator skipDescendants];
else {
nDocs++;
[documents addObject:fullPath];
}
}
}
if (nDocs == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment