conformal / cyphertite

A high-security scalable solution for online backups.
https://www.cyphertite.com/
46 stars 8 forks source link

Windows has trouble handling restores with long paths #61

Closed csmiken closed 10 years ago

csmiken commented 10 years ago

It appears that Cyphertite on Windows sometimes has trouble handling restores with long paths. I suspect that it is restoring files to a temporary location, then moving them to the restore location. While in the temporary location, the path length exceeds the 260 character Win32 limitation. The restore completes, but some files are given placeholder names in the restore location--even though they would have had lengths below 260 characters in that location.

One solution that would avoid a significant restructuring of your code would be to try to rename long files after moving them from the temporary location to the restore location. Alternatively, you could bypass the Win32 API and create files with paths up to 32,767 characters.

alphaleonis commented 10 years ago

Bypassing the Win32 API seems difficult on a Win32 platform. But the Win32 API supports extended-length paths as well. To specify an extended-length path, use the "\?\" prefix. For example, "\?\D:\very long path". (Well, not ALL methods support this of course, but most should). The problem is that not very many applications supports working with these paths, including Windows Explorer last time I checked.

csmiken commented 10 years ago

This has been fixed and tested with version 2.0.1 of Cyphertite. The extra characters from the temporary extract path no longer hinders the ability to extract successfully.