Skip to content

Apache Lucene open-source search software

- Added "&&" between the 3 calls that copy, remove, and move index data to add a bit of extra robustness

Otis Gospodneticbd5f3ae72377
diff --git a/src/scripts/snapinstaller b/src/scripts/snapinstaller
index f716e1a0b07..9ed8a589c23 100755
--- a/src/scripts/snapinstaller
+++ b/src/scripts/snapinstaller
@@ -141,8 +141,8 @@ fi
# install using hard links into temporary directory
# remove original index and then atomically copy new one into place
logMessage installing snapshot ${name}
-cp -lr ${name}/ ${data_dir}/index.tmp$$
-/bin/rm -rf ${data_dir}/index
+cp -lr ${name}/ ${data_dir}/index.tmp$$ && \
+/bin/rm -rf ${data_dir}/index && \
mv -f ${data_dir}/index.tmp$$ ${data_dir}/index
# update distribution stats