about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Functions/Misc/zrecompile8
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e0ca4a97..7cbde83b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-31  Bart Schaefer  <schaefer@zsh.org>
+
+	* unposted: Functions/Misc/zrecompile: change "mv" to "mv -f"
+	when backing up .zwc files, because zcompile creates the files
+	read-only.  See thread ending at users/7269.
+
 2004-03-30  Oliver Kiddle  <opk@zsh.org>
 
 	* 19708: Completion/compaudit: change getent() function to
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile
index 0db27f497..8fe990086 100644
--- a/Functions/Misc/zrecompile
+++ b/Functions/Misc/zrecompile
@@ -129,10 +129,10 @@ if [[ -n $pats ]]; then
 	# old file by renaming it.
 
 	if [[ -z "$quiet" ]] &&
-           { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } &&
+           { [[ ! -f $zwc ]] || mv -f $zwc ${zwc}.old } &&
            zcompile $map $tmp $zwc $files; then
           print succeeded
-	elif ! { { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } &&
+	elif ! { { [[ ! -f $zwc ]] || mv -f $zwc ${zwc}.old } &&
                  zcompile $map $tmp $zwc $files 2> /dev/null } then
           [[ -z $quiet ]] && print "re-compiling ${zwc}: failed"
           ret=1
@@ -233,10 +233,10 @@ for zwc; do
 	# old file by renaming it.
 
 	if [[ -z "$quiet" ]] &&
-           mv $zwc ${zwc}.old &&
+           mv -f $zwc ${zwc}.old &&
            zcompile $map $zwc $files; then
           print $mesg
-	elif ! { mv $zwc ${zwc}.old &&
+	elif ! { mv -f $zwc ${zwc}.old &&
                  zcompile $map $zwc $files 2> /dev/null } then
           [[ -z $quiet ]] && print "re-compiling ${zwc}: failed"
           ret=1