Skip to content

Commit 8d00aba

Browse files
authored
Fix save_file command in generate_dump (#3647)
* Fix save_file command in generate_dump * Fix save_file command in generate_dump
1 parent 038aaa5 commit 8d00aba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/generate_dump

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ save_file() {
10981098
fi
10991099

11001100
if $do_gzip; then
1101-
if [ ! -d "$path" ]; then
1101+
if [[ -f ${orig_path} ]]; then
11021102
gz_path="${gz_path}.gz"
11031103
tar_path="${tar_path}.gz"
11041104

@@ -1117,6 +1117,12 @@ save_file() {
11171117
tar -czvf "$gz_path" -C "$(dirname "$orig_path")" "$(basename "$orig_path")"
11181118
fi
11191119
fi
1120+
else
1121+
if $NOOP; then
1122+
echo "cp $orig_path $gz_path"
1123+
else
1124+
cp $orig_path $gz_path
1125+
fi
11201126
fi
11211127

11221128
if $do_tar_append; then

0 commit comments

Comments
 (0)