7712: Use full path for file existence check
This commit is contained in:
		@@ -295,7 +295,8 @@ class EditMedia(EditPrimary):
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        path = conv_to_unicode(self.file_path.get_text())
 | 
			
		||||
        if os.path.isfile(path):
 | 
			
		||||
        full_path = media_path_full(self.db, path)
 | 
			
		||||
        if os.path.isfile(full_path):
 | 
			
		||||
            self.determine_mime()
 | 
			
		||||
        else:                                                              
 | 
			
		||||
            msg1 = _("There is no media matching the current path value!") 
 | 
			
		||||
@@ -307,7 +308,7 @@ class EditMedia(EditPrimary):
 | 
			
		||||
            self.ok_button.set_sensitive(True)                             
 | 
			
		||||
            return                                                         
 | 
			
		||||
 | 
			
		||||
        self.obj.set_path(conv_to_unicode(path))
 | 
			
		||||
        self.obj.set_path(path)
 | 
			
		||||
 | 
			
		||||
        with DbTxn('', self.db) as trans:
 | 
			
		||||
            if not self.obj.get_handle():
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user