R
Russell E. Owen
I stumbled across a really strange bug involving directories on linux.
os.path.exists(path) can return 0 even after os.path.mkdir(path)
succeeds (well after; this isn't a timing issue).
For the first file, the directory did not exist, so my code created the
directory (successfully) using os.path.mkdir(path). The next file
failed because os.path.exists(path) returned false, so my code tried to
create the directory again, which failed with "directory exists".
It seems that the path was to a "fat" file partition and included a
directory name that was all uppercase. The directory was created, but
using lowercase. I'm not yet sure the version of python.
The workaround for now is to not use fat file partitions. But I was
wondering if anyone had a better option?
-- Russell
os.path.exists(path) can return 0 even after os.path.mkdir(path)
succeeds (well after; this isn't a timing issue).
For the first file, the directory did not exist, so my code created the
directory (successfully) using os.path.mkdir(path). The next file
failed because os.path.exists(path) returned false, so my code tried to
create the directory again, which failed with "directory exists".
It seems that the path was to a "fat" file partition and included a
directory name that was all uppercase. The directory was created, but
using lowercase. I'm not yet sure the version of python.
The workaround for now is to not use fat file partitions. But I was
wondering if anyone had a better option?
-- Russell