Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'There's a Bug' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
There's a Bug
Authored by: thinkyhead on Jun 12, '02 04:17:13AM
If the new name for a file / folder matches the name of an existing file / folder something very bad will happen to that file / folder. Put this before the "if" statement to avoid the problem:
x=1 BaseName=$ShortName while [ -e "$ShortName" ]; do ShortName="$BaseName$x" let x=x+1 done

[ Reply to This | # ]
And a bug in my bug-fix
Authored by: thinkyhead on Jun 12, '02 04:20:25AM
Use this in place of the original "if" statement I provided:
while [ -e "$Location/$ShortName" ]; do

[ Reply to This | # ]