7435: Media Editor error if Path value was changed to a non existing file
This commit is contained in:
parent
49cdfe3283
commit
22ec94f84d
@ -297,7 +297,17 @@ class EditMedia(EditPrimary):
|
|||||||
return
|
return
|
||||||
|
|
||||||
path = self.file_path.get_text()
|
path = self.file_path.get_text()
|
||||||
self.determine_mime()
|
if os.path.isfile(path):
|
||||||
|
self.determine_mime()
|
||||||
|
else:
|
||||||
|
msg1 = _("There is no media matching the current path value!")
|
||||||
|
msg2 = _("You have attempted to use the path with "
|
||||||
|
"value '%(path)s'. This path does not exist!"
|
||||||
|
" Please enter a different path") % {
|
||||||
|
'path' : path }
|
||||||
|
ErrorDialog(msg1, msg2)
|
||||||
|
self.ok_button.set_sensitive(True)
|
||||||
|
return
|
||||||
|
|
||||||
self.obj.set_path(get_unicode_path_from_file_chooser(path))
|
self.obj.set_path(get_unicode_path_from_file_chooser(path))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user