|  | @@ -850,8 +850,9 @@ class File(DAVNonCollection):
 | 
	
		
			
			| 850 | 850 |  
 | 
	
		
			
			| 851 | 851 |      def getPreferredPath(self):
 | 
	
		
			
			| 852 | 852 |          fix_txt = '.txt' if self.getContentType() == 'text/plain' else mimetypes.guess_extension(self.getContentType())
 | 
	
		
			
			| 853 |  | -
 | 
	
		
			
			| 854 |  | -        if self.content.label == '' or self.path.endswith(fix_txt):
 | 
	
		
			
			|  | 853 | +        if not fix_txt:
 | 
	
		
			
			|  | 854 | +            fix_txt = ''
 | 
	
		
			
			|  | 855 | +        if self.content and self.path and (self.content.label == '' or self.path.endswith(fix_txt)):
 | 
	
		
			
			| 855 | 856 |              return self.path
 | 
	
		
			
			| 856 | 857 |          else:
 | 
	
		
			
			| 857 | 858 |              return self.path + fix_txt
 |