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

shorten path seems not to work on levels more than 2 subdirs deep #6

Open
LandisTwo opened this issue Jan 4, 2019 · 1 comment
Open

Comments

@LandisTwo
Copy link

Nice util, for shallow directory structure.
But, when I use on a sub directory more than 4 levels deeper than /, Symlinks only drops the 2 or 3 directories above working directory.
example:
/home/user/Media/4TBackup/videos/Auto/WorkingDir/symlink-files.ext
symlink-files.ext links to
/home/user/Media/4TBackup/videos/Auto/OriginalDir/original-files.ext
Symlinks Util, using # symlinks -rcsov only shortens link path to:
/home/user/Media/OriginalDir/symlink-files.ext,
dropping only 2 or 3 directories exp: /4TBackup/videos/Auto/

  • i've tried with and without -r and -o - same results.

Also, will not change any dangling symlink (0 byte).
It would be nice if it did, as it may only be 'dangling' because it was moved from /old-vol/dir/sub-dir1 to /new-vol/dir/sub2, and with the destination file actually residing in /dir/sub-dir0/ it would work being changed to ../sub-dir0 even though it's currently 0 byte.

Again, Symlinks works great when directories are only 1 or 2 directories below my user's home directory:
eg /home/user/working/file.ext linked to /home/user/tmp/file.ext
resulting in correct shortened path of: ../file.ext

Thanks,
Landis.

@LandisTwo
Copy link
Author

p.s. I've tried while in the 'link directory', the source directory using full path from /home/user directory, and being in the highest 'common' (parent) directory of both source and symlink, but No.
Symlink still drops 3 directories from symlink's path. : (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant