Added check of comic archive's home folder's write permission

git-svn-id: http://comictagger.googlecode.com/svn/trunk@100 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2012-11-27 19:37:04 +00:00
parent 5ed01aa16b
commit 72c27d98c6

View File

@ -390,7 +390,7 @@ class ComicArchive:
def isFolder( self ):
return self.archive_type == self.ArchiveType.Folder
def isWritable( self ):
def isWritable( self ):
if self.archive_type == self.ArchiveType.Unknown :
return False
@ -399,6 +399,10 @@ class ComicArchive:
elif not os.access(self.path, os.W_OK):
return False
elif ((self.archive_type != self.ArchiveType.Folder) and
(not os.access( os.path.dirname( os.path.abspath(self.path)), os.W_OK ))):
return False
return True