safer handling of rootdir
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@415 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -1343,8 +1343,9 @@ def installFile(package, infoDict = None):
|
||||
rootdir = imagepathDir[len(imageDir):]
|
||||
# get info
|
||||
if (rootdir):
|
||||
if os.path.islink(rootdir) or os.path.isfile(rootdir):
|
||||
os.remove(rootdir)
|
||||
if os.path.islink(rootdir):
|
||||
if not os.access(os.readlink(rootdir),os.R_OK): # broken symlink
|
||||
os.remove(rootdir)
|
||||
if not os.path.isdir(rootdir):
|
||||
#print "creating dir "+rootdir
|
||||
os.makedirs(rootdir)
|
||||
|
||||
Reference in New Issue
Block a user