summaryrefslogtreecommitdiff
path: root/morphlib/stagingarea.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/stagingarea.py')
-rw-r--r--morphlib/stagingarea.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index 4b74a4d0..8c84ac36 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -131,15 +131,15 @@ class StagingArea(object):
return True # target does not exist
if tarinfo.isdir():
- if existing.isdir():
+ if stat.S_ISDIR(existing.st_mode):
return True
- elif existing.islnk():
+ elif stat.S_ISLNK(existing.st_mode):
st = follow_symlink(targetpath)
return st and stat.S_ISDIR(st.st_mode)
else:
- if existing.isdir():
+ if stat.S_ISDIR(existing.st_mode):
return False
- elif existing.islnk():
+ elif stat.S_ISLNK(existing.st_mode):
st = follow_symlink(targetpath)
if st and not stat.S_ISDIR(st.st_mode):
os.remove(targetpath)