Files icon indicating copy to clipboard operation
Files copied to clipboard

Traversing folders seems to be a problem

Open SF-Simon opened this issue 8 years ago • 4 comments

let folders = Array(try Folder(path: "/xx/xx/").makeSubfolderSequence(recursive: true, includeHidden: false));

This is the swift code, I'm not running in the main thread main, and when my files are less, it's no problem. But if I have more files (about 150), there will be a problem, and Xcode directly locate the error.

CurrentChildIterator = childIteratorQueue.removeFirst()

I can't understand what this is, and I hope to be able to get the solution.

SF-Simon avatar Dec 21 '17 05:12 SF-Simon

@DivenLee what seems to be the problem? Like what happens when you have > 150 files? And are you talking about 150 directories (nested or un-nested) or just files?

clayellis avatar Dec 21 '17 07:12 clayellis

@clayellis I'm sorry, my English is very bad. I try to describe it again.

About 150 files are not folders. These files are very messy, there is no fixed structure, but most of them are in the same sub folder, and there are other folders under this folder. But it's strange that I traversed all the files, and it won't go wrong, only when I traversed all the folders.

SF-Simon avatar Dec 21 '17 08:12 SF-Simon

@DivenLee no worries, I'm sure I'm not very good at your native language! (Unless it's French...)

So when you traverse all of the files you see the files you expect, correct?

But when you traverse all of the folders, some of the folders are missing?

clayellis avatar Dec 21 '17 17:12 clayellis

@clayellis No, it's crash, and the application has not been able to run again. And Xcode jumped directly to the position I said

CurrentChildIterator = childIteratorQueue.removeFirst()

This is within the Files

SF-Simon avatar Dec 22 '17 02:12 SF-Simon