Closed elgarfo closed 5 years ago
works for me (on debian 8): adding "-f" to the command line switches for readlink (from the man pages: https://linux.die.net/man/1/readlink)
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.
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"