[svn:parrot] r42405 - trunk/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Tue Nov 10 21:49:42 UTC 2009
Author: fperrad
Date: Tue Nov 10 21:49:42 2009
New Revision: 42405
URL: https://trac.parrot.org/parrot/changeset/42405
Log:
[distutils] improve unlink
Modified:
trunk/runtime/parrot/library/distutils.pir
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Tue Nov 10 21:32:20 2009 (r42404)
+++ trunk/runtime/parrot/library/distutils.pir Tue Nov 10 21:49:42 2009 (r42405)
@@ -1866,16 +1866,14 @@
.sub 'unlink'
.param string filename
$I0 = stat filename, .STAT_EXISTS
- if $I0 goto L1
- .return ()
- L1:
+ unless $I0 goto L1
+ $I0 = stat filename, .STAT_ISREG
+ unless $I0 goto L1
print "unlink "
say filename
new $P0, 'OS'
- push_eh _handler
$P0.'rm'(filename)
- pop_eh
- _handler:
+ L1:
.return ()
.end
More information about the parrot-commits
mailing list