harmy / boar

Automatically exported from code.google.com/p/boar
0 stars 0 forks source link

File and path length limits on Windows #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a directory with a subtree path that is longer than about 250 chars.
2. Import the directory with Boar

What is the expected output? What do you see instead?
The import should succeed for all valid filenames in the file system. Instead, 
an error occurs. The actual error that will occur depends on the specifics of 
the imported directory. 

The reason for the problem is that Python primitives such as os.stat(), 
os.makedirs() and os.path.isdir() do not work with long paths or filenames. 
This is due to limitations of the Windows API. 

The problem is not easily fixed. Most library functions will work correctly if 
the filename is converted to the UNC format first ("c:\file.txt" becomes 
"\\?\c:\file.txt"). However, this format has its own problems. Also, the kind 
of paths that Boar has problems with, will also cause problems for Windows 
itself. For instance, explorer in windows 7 will simply refuse to open 
directories with long paths.

Original issue reported on code.google.com by ekb...@gmail.com on 2 Oct 2012 at 10:32

GoogleCodeExporter commented 9 years ago

Original comment by ekb...@gmail.com on 2 Oct 2012 at 10:32