Ignore empty LocalStatus files
I created new IMAP folders on my server. In some moment I found offlineimap crashed. The reason were empty LocalStatus files. From looking at the code I have no explanation how those files came into existence.
This commit is contained in:
		 Florian Friesdorf
					Florian Friesdorf
				
			
				
					committed by
					
						 John Goerzen
						John Goerzen
					
				
			
			
				
	
			
			
			 John Goerzen
						John Goerzen
					
				
			
						parent
						
							cd04e2e03e
						
					
				
				
					commit
					b18f55a7e2
				
			| @@ -67,6 +67,11 @@ class LocalStatusFolder(BaseFolder): | ||||
|         file = open(self.filename, "rt") | ||||
|         self.messagelist = {} | ||||
|         line = file.readline().strip() | ||||
|         if not line and not line.read() | ||||
|             # The status file is empty - should not have happened, | ||||
|             # but somehow did. | ||||
|             file.close() | ||||
|             return | ||||
|         assert(line == magicline) | ||||
|         for line in file.xreadlines(): | ||||
|             line = line.strip() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user