juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.06k stars 888 forks source link

fix(sync): Handling the case where local file paths contain a colon(:) #4925

Closed CodeRusher closed 4 days ago

CodeRusher commented 3 weeks ago

The issue here is determining whether a given URI is for a local file or SFTP based on whether the URI contains a colon. However, it's important to note that local file paths can indeed contain a colon.

Solution: When the URI contains a colon, first check if the local file path exists.

davies commented 2 weeks ago

This is still confusing, for example, you can't use ip:port when there is a file or directory has the same name.

It's better to use full uri to address the confusion, for example, file:///path/with/:

CodeRusher commented 2 weeks ago

This is still confusing, for example, you can't use ip:port when there is a file or directory has the same name.

It's better to use full uri to address the confusion, for example, file:///path/with/:

Yes, that is still confusing,but this modification is slightly better. Situations where local files exist in paths similar to SFTP are rare, whereas it's more common for local files to contain colons (":").

Additionally, is it possible to discontinue support for abbreviated usage of the SFTP/SSH protocol, and retain only the support for the abbreviated usage of local files?