From d93db4f4272a3721673f46ee0db76de2a79e696a Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 19 Nov 2010 10:51:48 +0300 Subject: [PATCH] Fix detect WriteMode for shadow-. --- pym/cl_migrate_users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/cl_migrate_users.py b/pym/cl_migrate_users.py index b5a632c..877dff0 100644 --- a/pym/cl_migrate_users.py +++ b/pym/cl_migrate_users.py @@ -402,10 +402,10 @@ class migrate(color_print): # Check permissions backup files checkNewBackupFiles = map(lambda x:pathJoin(self.prefixNewSystem,x+"-"), checkThisFiles) - notWriteBackup = lambda x: not os.access(x, os.W_OK) or\ - (not os.path.exists(x) and\ + notWriteBackup = lambda x: not os.access(x, os.W_OK) and \ + (os.path.exists(x) or \ not os.access(os.path.dirname(x), os.W_OK)) - filesNotWrite = filter(notWrite, checkNewBackupFiles) + filesNotWrite = filter(notWriteBackup, checkNewBackupFiles) if filesNotWrite: self.printERROR(_("Can not write to files") + ": " +\ ", ".join(filesNotWrite))