Move the data directories too, not only the files inside them

This commit is contained in:
Gmer4Lfe
2026-08-08 23:43:57 -04:00
parent f1603349cc
commit e406bd445d
+8 -2
View File
@@ -216,8 +216,14 @@ for f in "$DATA_DIR"/*-wal "$DATA_DIR"/*-shm; do
classify "$f"
done
for f in "$DATA_DIR"/*; do
[[ -d "$f" ]] && continue # subfolders are the destinations
case "$(basename "$f")" in *-wal|*-shm) continue ;; esac
# Skip the destinations by name, not everything that happens to be a directory. ai_bugs/ and
# ai_chats/ are directories that belong under ai/, and an earlier version of this skipped
# every directory outright — which moved neither, silently, while the PHP layer had already
# been repointed at the new location. They were empty at the time; that was luck, not design.
case "$(basename "$f")" in
db|state|ai|cache|logs) continue ;;
*-wal|*-shm) continue ;;
esac
classify "$f"
done
shopt -u nullglob