|
|
|
@ -1981,8 +1981,25 @@ or ld_bind_dn or ld_bind_pw")
|
|
|
|
|
os.chmod(destDir, 0700)
|
|
|
|
|
os.chown(destDir, uid,gid)
|
|
|
|
|
flagError=False
|
|
|
|
|
for srcFile in files:
|
|
|
|
|
destFile = destDir + srcFile.split(srcDir)[1]
|
|
|
|
|
for nameFile in files:
|
|
|
|
|
srcFile = os.path.join(srcDir, nameFile)
|
|
|
|
|
destFile = os.path.join(destDir, nameFile)
|
|
|
|
|
# Создаем ссылки
|
|
|
|
|
if os.path.islink(srcFile):
|
|
|
|
|
dst = srcFile
|
|
|
|
|
src = os.readlink(srcFile)
|
|
|
|
|
os.symlink(src,destFile)
|
|
|
|
|
if os.path.exists(destFile):
|
|
|
|
|
mode,uid,gid = fileObj.getModeFile(destFile)
|
|
|
|
|
#Изменение прав на ссылки
|
|
|
|
|
os.lchown(destFile, uid, gid)
|
|
|
|
|
os.unlink(srcFile)
|
|
|
|
|
continue
|
|
|
|
|
# Удаляем сокеты
|
|
|
|
|
elif stat.S_ISSOCK(os.stat(srcFile)[stat.ST_MODE]):
|
|
|
|
|
os.remove(srcFile)
|
|
|
|
|
continue
|
|
|
|
|
# Переносим оставшиеся файлы и директории
|
|
|
|
|
if os.system("mv %s %s &>/dev/null"%(srcFile,destFile)) != 0:
|
|
|
|
|
self.printERROR(_("Can not move %s")%srcFile + " " +\
|
|
|
|
|
_("to %s")%destFile)
|
|
|
|
|