Unset corretly nublette
authorCameron Ball <cameron@cameron1729.xyz>
Mon, 8 Apr 2019 17:35:47 +0000 (01:35 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Mon, 8 Apr 2019 17:35:47 +0000 (01:35 +0800)
SongSync.sh

index 8146e11..f5cb9ea 100755 (executable)
@@ -55,7 +55,7 @@ if [ "$1" = "apply" ]; then
 
             if [ "${removes[${path}]}" = "$hash" ]; then
                 echo "Same hash ($hash) and path ($path) in adds and removes. Ignoring."
-                unset removes["$hash"]
+                unset removes["$path"]
                 continue
             fi
 
@@ -74,7 +74,7 @@ if [ "$1" = "apply" ]; then
             if [ -z "${removes[${path}]}" ]; then
                 if [ "${adds[${path}]}" = "$hash" ]; then
                     echo "Same hash ($hash) and path ($path) in adds and removes. Ignoring."
-                    unset adds["$hash"]
+                    unset adds["$path"]
                     continue
                 fi