Allow empty foldernames
Empty foldernames (as they could be created through nametrans) were failing as the uidvalidity and status files names as determined by folder/Base.py:getfolderbasename() lead to invalid file names ''. Fix this by handling empty file names and translating them to '.' which leads to the special file name 'dot'. (this special value existed before and was not invented by this patch) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		 Sebastian Spaeth
					Sebastian Spaeth
				
			
				
					committed by
					
						 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
			
				
	
			
			
			 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
						parent
						
							4f1cd05fdc
						
					
				
				
					commit
					373e7cdbc1
				
			| @@ -115,7 +115,7 @@ class LocalStatusSQLiteFolder(LocalStatusFolder): | ||||
|             plaintextfilename = os.path.join( | ||||
|                 self.repository.account.getaccountmeta(), | ||||
|                 'LocalStatus', | ||||
|                 re.sub('(^|\/)\.$','\\1dot', self.name)) | ||||
|                 self.getfolderbasename(self.name)) | ||||
|             # MIGRATE from plaintext if needed | ||||
|             if os.path.exists(plaintextfilename): | ||||
|                 self.ui._msg('Migrating LocalStatus cache from plain text ' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user