diff --git a/web/rclone-mount b/web/rclone-mount index 74b774c..379309c 100755 --- a/web/rclone-mount +++ b/web/rclone-mount @@ -44,7 +44,7 @@ _askpass() { } _check_mount() { - if [[ -d "$valid_name" ]]; then + if [[ -d ~/mnt/"$valid_name" ]]; then device1=$( stat -c "%d" ~/mnt/"$valid_name" ) device2=$( stat -c "%d" ~/mnt ) else @@ -73,6 +73,7 @@ valid_name=$( echo "${remote%:}" | sed -e 's/:/-/g' | sed -e 's/[^A-Za-z0-9._@-] if [[ "$unmount" = true ]]; then cd ~/mnt if [[ -n "$remote" ]]; then + echo Unmounting ~/mnt/$valid_name fusermount -u -z ~/mnt/$valid_name rmdir --ignore-fail-on-non-empty ~/mnt/$valid_name &>/dev/null else diff --git a/web/sshfs-mount b/web/sshfs-mount index 392afd2..719bdca 100755 --- a/web/sshfs-mount +++ b/web/sshfs-mount @@ -60,6 +60,7 @@ fi if [[ "$unmount" = true ]]; then cd ~/mnt if [[ -n "$host" ]]; then + echo Unmounting ~/mnt/$valid_name fusermount -u -z ~/mnt/$valid_name rmdir --ignore-fail-on-non-empty ~/mnt/$valid_name &>/dev/null else @@ -78,9 +79,9 @@ if [[ -z "$host" ]]; then _helpexit fi -if [[ -d "$valid_name" ]]; then - device1=$( stat -c "%d" "$valid_name" ) - device2=$( stat -c "%d" . ) +if [[ -d ~/mnt/"$valid_name" ]]; then + device1=$( stat -c "%d" ~/mnt/"$valid_name" ) + device2=$( stat -c "%d" ~/mnt/ ) else device1=valid device2=valid