summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2015-10-21 11:54:42 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2015-10-21 11:54:42 -0700
commit0193c0d3e1633676d73477d3fb2c2be319e9da1b (patch)
treefaa44d359ea22c2b5a0e57232fbfce942efd4316
parenta8c416fa7b8a15e97436422a7d8064473d156cf3 (diff)
Narrow window during which uicache race can occur.v1.1.26
-rwxr-xr-xLibrary/move.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/move.sh b/Library/move.sh
index 54750cd..1e9dbb2 100755
--- a/Library/move.sh
+++ b/Library/move.sh
@@ -39,6 +39,8 @@ function mv_() {
exit 1
}
+ echo -n "${src}" >"${tmp}.lnk"
+
if [[ -e ${src} ]]; then
chmod --reference="${src}" "${dst}"
chown --reference="${src}" "${dst}"
@@ -48,14 +50,14 @@ function mv_() {
exit 1
}
- rm -rf $v "${src}"
+ mv $v "${src}" "${src}.moved"
+ ln -s "${dst}" "${src}"
+ rm -rf $v "${src}.moved"
else
chmod 775 "${dst}"
chown root.admin "${dst}"
+ ln -s "${dst}" "${src}"
fi
-
- ln -s "${dst}" "${src}"
- echo -n "${src}" >"${tmp}.lnk"
}
function shift_() {