dosym her çağrıldığında makedirs yapma , bu directory zaten önceden yapılmış olunabilir ( multiple dosym durumu )

This commit is contained in:
İsmail Dönmez
2005-10-12 16:14:55 +00:00
parent 5bdbeb6b36
commit 1980504a1b
+3 -1
View File
@@ -193,7 +193,9 @@ def dosym(sourceFile, destinationFile):
'''creates soft link between sourceFile and destinationFile'''
''' example call: pisitools.dosym("/usr/bin/bash", "/bin/bash")'''
makedirs(get.installDIR() + os.path.dirname(destinationFile))
path = get.installDIR() + os.path.dirname(destinationFile)
if not os.access(path, os.F_OK):
makedirs(path)
try:
os.symlink(sourceFile, get.installDIR() + destinationFile)