Skip to content

Commit 6e4c42b

Browse files
committed
update check
1 parent b60a3e6 commit 6e4c42b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

share/github-backup-utils/ghe-prune-snapshots

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ prune_snapshot() {
2424
#if [ ! -f "$GHE_DATA_DIR/in-progress" ] && [ ! -f "$GHE_DATA_DIR/in-progress-restore" ]; then
2525
# Check for backup or restore in-progress file
2626
inprogress_file=$(find $GHE_DATA_DIR -maxdepth 1 -type f \( -name "in-progress" -o -name "in-progress-restore" \) -print -quit)
27-
if [[ "$CALLING_SCRIPT" == "ghe-backup" ]]; then
27+
if [[ "$CALLING_SCRIPT" == "ghe-backup" ]] || [ -z "$inprogress_file" ]; then
2828
# First prune all incomplete / failed snapshot directories
2929
prune_dirs="$(ls -1 "$GHE_DATA_DIR"/[0-9]*/incomplete 2>/dev/null || true)"
3030
prune_num=$(echo "$prune_dirs" | grep -v '^$' | wc -l)

0 commit comments

Comments
 (0)