Browse Source

Unzip Archive overwrite fix

when zip archive is unzip it gives error  "" archive was not extracted ""  in case there were same files already present in the folder , its due to overwrite flag (-o) missing in unzip command used in vestacp
darkworks 9 years ago
parent
commit
28e34fdecb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-extract-fs-archive

+ 1 - 1
bin/v-extract-fs-archive

@@ -82,7 +82,7 @@ fi
 # Extracting ziped archive
 # Extracting ziped archive
 if [ ! -z "$(echo $src_file |grep -i  '.zip')" ]; then
 if [ ! -z "$(echo $src_file |grep -i  '.zip')" ]; then
     sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
     sudo -u $user mkdir -p "$dst_dir" >/dev/null 2>&1
-    sudo -u $user unzip "$src_file" -d "$dst_dir" >/dev/null 2>&1
+    sudo -u $user unzip -o "$src_file" -d "$dst_dir" >/dev/null 2>&1
     rc=$?
     rc=$?
 fi
 fi