bug fix
authorIan Kelling <ian@iankelling.org>
Wed, 9 Jun 2021 01:16:08 +0000 (21:16 -0400)
committerIan Kelling <ian@iankelling.org>
Wed, 9 Jun 2021 01:16:08 +0000 (21:16 -0400)
conflink

index 187f9592fdab6451b0665ef9ae2048ec4395cf85..b0e67ad7160bbe1b411c4663cf4bbce4fc1f7113 100755 (executable)
--- a/conflink
+++ b/conflink
@@ -44,7 +44,8 @@ shopt -s extglob
 shopt -s dotglob
 
 # If we make a link back to the root, we stop going deeper into subdir_files.
-# This makes it so we can do subdir directories.
+# This makes it so we can do subdir directories. eg
+# /p/c/subdir_files/.config/gajim -> ../../gagim
 #
 # Also note, under filesystem/, symlinks are expanded.
 
@@ -63,8 +64,7 @@ subdir-link-r() {
   for path in "${targets[@]}"; do
     local fullpath
     fullpath="$(readlink -f "$path")"
-    #e $fullpath $below # debug
-    if [[ -f $path || $(dirname $(readlink -f "$fullpath")) == "$below" ]]; then
+    if [[ -f $path || $(dirname "$fullpath") == "$below" ]]; then
       m lnf -T "$path" "$HOME/${path#$root/}"
     elif [[ -d "$path" ]]; then
       subdir-link-r "$root" "$path"