Closed gavineadie closed 2 years ago
My diagnosis seems to be wrong .. further exploration reveals more complexity.
Removing the offensive files from the above tree doesn't solve the problem, copying the baseDirectory
(after removing those files) propagates the problem, but creating a new baseDirectory
and creating contained files from scratch doesn't suffer. For now, I'm concluding those \
files make a permanent corruption to that part of the file structure they were contained in.
The specific issue, which Finder and Terminal don't reveal, is that the enumeration of the folders in baseDirectory
contains baseDirectory
itself and subFolders
goes terminally recursive. The usage:
baseFolder.subfolders.recursive.names()
doesn't ever return.
.. but this problem will 'never' happen because files containing a \
in their names can't be created in the modern era, so I'm closing this and erasing it from my recollection of hours of frustration!
This took a long time to pin down!
The following directory will confuse
baseDirectory.subfolders.includingHidden.count()
because the embedded backslash characters indicate, falsely, that there are directories present. It is quite difficult to create files like that .. in this case they were created by a legacy version of Entourage. Another way they could be created (it may also be a legacy mechanism) is by pasting an image into a Finder icon via "Get Info.." which creates a file calledIcon\015
in the directory.