iterate-ch / cyberduck

Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.
https://cyberduck.io/
GNU General Public License v3.0
3.22k stars 286 forks source link

Support arbitrary path lengths #16119

Open AliveDevil opened 2 months ago

AliveDevil commented 2 months ago

Currently the entire codebase is not long-path compatible:

Possible options: Drop usage of java.nio.file in all of Cyberduck (and all dependencies) - does not handle long paths issues in System.IO Add polyfill for System.IO, which automatically prefixes everything with \\?\ as required - does not handle long path issues in java.nio.file.

With integration of ikvmnet we detach from the legacy IKVM implementation, which reimplemented huge parts of the JDK using .NET technology, with shipping rebuilds of the JDK native code, which restores real JDK behavior (i.e. everything the JDK has built for e.g. java.nio.file does work now). This includes automatic prefixing of long-paths with \\?\ and support of long paths in java.nio.file.

Until migrating to .NET 8 (or later) an Api analyzer is added to Cyberduck, which bans all of System.IO.

AliveDevil commented 2 months ago

To be determined whether WatchService supports long paths (using ReadDirectoryChangesW). Preliminary tests showed that it's not compatible, but unit test needs to be written.