Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbolic links on local side are not handled properly #995

Closed
cyberduck opened this issue Jan 16, 2007 · 4 comments
Closed

Symbolic links on local side are not handled properly #995

cyberduck opened this issue Jan 16, 2007 · 4 comments
Assignees

Comments

@cyberduck
Copy link
Collaborator

99ca488 created the issue

When you download a file and overwrite a file that is a symbolic link on the local machine Cyberduck does something very weird. It should open a file pointer on the symbolic link and the filesystem will handle writing the contents of the file to the location that is referred to by the symbolic link.

Example:

In Terminal:

cd ~/tmp
echo "Hello world" > file.txt
ln -s file.txt link.txt
ls -al

In Cyberduck:

Upload link.txt
Download link.txt

In Terminal:

cd ~/tmp
ls -al

See that file.txt has now become a symbolic link to 'Hello world?' - it's not even a file anymore.

Thanks for a great FTP client!

Simon

@cyberduck
Copy link
Collaborator Author

@dkocher commented

This seems to work here without any issues. What is not supported are the old style 'Alias' created in the Finder.app. These will get transferred as zero-sized files. Please reopen with more details (the output of ls -al before and after the transfers) if you can reproduce this issue.

@cyberduck
Copy link
Collaborator Author

99ca488 commented

monty:~/tmp$ echo "Hello world" > file.txt
monty:~/tmp$ ln -s file.txt link.txt
monty:~/tmp$ ls -al
total 16
drwxr-xr-x     4 simonwad  staff   136 Jan 22 10:24 .
drwxr-xr-x   131 simonwad  staff  4454 Jan 22 10:23 ..
-rw-r--r--     1 simonwad  staff    12 Jan 22 10:24 file.txt
lrwxr-xr-x     1 simonwad  staff     8 Jan 22 10:24 link.txt -> file.txt

Uploaded and downloaded link.txt

monty:~/tmp$ ls -al
total 16
drwxr-xr-x     5 simonwad  staff   170 Jan 22 10:26 .
drwxr-xr-x   131 simonwad  staff  4454 Jan 22 10:23 ..
-rw-r--r--     1 simonwad  staff     0 Jan 21 18:25 Hello world?
lrwxr-xr-x     1 simonwad  staff    12 Jan 22 10:26 file.txt -> Hello world?
lrwxr-xr-x     1 simonwad  staff     8 Jan 22 10:24 link.txt -> file.txt

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Thanks for the updated comment. I can see this now - very weird. Seems to be a problem in java.io.File as this is supposed to resolve symbolic transparently.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

As of e959cda.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants