Skip to content

Commit e808fd5

Browse files
authored
Removing empty directories in rmlocal
1 parent a86ec6e commit e808fd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/rmlocal

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ rm_time () {
3939
echo "[ $(date ${date_format}) ] Moving file -> ${n} to Google Drive."
4040
"${rclone_bin}" move $rclone_options "$n" "${rclone_cloud_endpoint}${destpath}" >/dev/null 2>&1
4141
done
42+
43+
find "${local_decrypt_dir}" -depth -type d -empty -delete
4244
}
4345

4446
rm_space () {
@@ -90,7 +92,9 @@ rm_space () {
9092
# Move file to remote destination[s], retaining path
9193
echo "[ $(date ${date_format}) ] Moving file -> ${n} to Google Drive. Freeing up ${fileSizeGb} GB"
9294
"${rclone_bin}" move $rclone_options "$n" "${rclone_cloud_endpoint}${destpath}" >/dev/null 2>&1
93-
done
95+
done
96+
97+
find "${local_decrypt_dir}" -depth -type d -empty -delete
9498
}
9599

96100
# If script is already running; abort.

0 commit comments

Comments
 (0)