diff options
| author | Jim Meyering <jim@meyering.net> | 1999-12-04 17:33:49 +0000 |
|---|---|---|
| committer | Jim Meyering <jim@meyering.net> | 1999-12-04 17:33:49 +0000 |
| commit | f05badd2305a8c1c1bc4c1e89109525dd0da8bb8 (patch) | |
| tree | b4ae6c53f78b8a6cc6518bc37694679f841cdf34 /tests/cp/cp-mv-backup | |
| parent | *** empty log message *** (diff) | |
| download | coreutils-f05badd2305a8c1c1bc4c1e89109525dd0da8bb8.tar.gz coreutils-f05badd2305a8c1c1bc4c1e89109525dd0da8bb8.zip | |
(trap): Be careful to close $actual before
removing the containing directory. Otherwise, on some systems rmdir
fails to remove the containing directory.
Diffstat (limited to 'tests/cp/cp-mv-backup')
| -rwxr-xr-x | tests/cp/cp-mv-backup | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup index 3ae81764d..b861248c8 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -15,7 +15,9 @@ pwd=`pwd` dir=cpmvbak-$$ actual=$dir/actual expected=$dir/expected -trap "cd $pwd; rm -rf $dir" 0 1 2 3 15 + +# Be careful to close $actual before removing the containing directory. +trap "cd $pwd; exec 1<&-; rm -rf $dir" 0 1 2 3 15 mkdir $dir unset VERSION_CONTROL SIMPLE_BACKUP_SUFFIX |
