diff options
author | Steven Knight <knight@baldmt.com> | 2002-04-23 03:05:50 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-04-23 03:05:50 (GMT) |
commit | b528e18b520a19f5960a7cca36d8f0077a00b337 (patch) | |
tree | f997c57db73ddf2002f681d412a50ea48ce92c44 /SConstruct | |
parent | fd18e34d0635b7f346995a0d54f9dce62997ed49 (diff) | |
download | SCons-b528e18b520a19f5960a7cca36d8f0077a00b337.zip SCons-b528e18b520a19f5960a7cca36d8f0077a00b337.tar.gz SCons-b528e18b520a19f5960a7cca36d8f0077a00b337.tar.bz2 |
Fix attempts to unlink directories when unzipping an archive.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -204,9 +204,10 @@ try: print dest,name # if the file exists, then delete it before writing # to it so that we don't end up trying to write to a symlink: - if os.path.exists(dest): + if os.path.isfile(dest) or os.path.islink(dest): os.unlink(dest) - open(dest, 'w').write(zf.read(name)) + if not os.path.isdir(dest): + open(dest, 'w').write(zf.read(name)) except: if unzip and zip: |