7435: Media Editor error if Path value was changed to a non existing file
fix media path
This commit is contained in:
parent
fe8d5bb9cd
commit
06e6a76e03
@ -290,7 +290,11 @@ class EditMedia(EditPrimary):
|
|||||||
return
|
return
|
||||||
|
|
||||||
path = self.file_path.get_text()
|
path = self.file_path.get_text()
|
||||||
if os.path.isfile(path):
|
ref_obj = self.dbstate.db.get_object_from_handle(self.obj.handle)
|
||||||
|
if ref_obj:
|
||||||
|
media_path = media_path_full(self.dbstate.db,
|
||||||
|
ref_obj.get_path())
|
||||||
|
if os.path.exists(os.path.join(os.path.dirname(media_path), path)):
|
||||||
self.determine_mime()
|
self.determine_mime()
|
||||||
else:
|
else:
|
||||||
msg1 = _("There is no media matching the current path value!")
|
msg1 = _("There is no media matching the current path value!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user