-
Notifications
You must be signed in to change notification settings - Fork 123
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
unable to open symlinks with relative paths #68
Labels
Comments
works for me (on debian 8): diff --git a/bin/rmate b/bin/rmate
index 7c04097..025b3b3 100755
--- a/bin/rmate
+++ b/bin/rmate
@@ -138,7 +138,7 @@ function canonicalize {
local dir=$(dirpath "$filepath")
if [ -L "$filepath" ]; then
- relativepath=$(cd "$dir" || { echo "unable to cd to $dir" 1>&2; exit; } ; readlink "$(basename "$filepath")")
+ relativepath=$(cd "$dir" || { echo "unable to cd to $dir" 1>&2; exit; } ; readlink -f "$(basename "$filepath")")
result=$(dirpath "$relativepath")/$(basename "$relativepath")
else
result=$(basename "$filepath") |
Hi, the problem is, that -f is not available on some systems (eg.: macOS). But i'll have a look into the issue. |
This is now fixed in master branch. Thanks all for suggestions and help. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cmdline:
rmate -P 30698 /etc/apache2/sites-enabled/my.awesome.site-ssl.conf
actual result:
expected result:
rmate opening and sending the real file the symlink points to
additional info:
symlink points to "../sites-available/my.awesome.site-ssl.conf"
The text was updated successfully, but these errors were encountered: