When taking a screenshot, fall back to filename if title metadata contains slash
A message like
(totem:221498): Totem-WARNING **: 13:57:47.354: Could not find a valid location to save the screenshot: Failed to find a valid place to save
is logged when the following steps are followed:
- Take any video and edit its metadata (e.g. with EasyTag) such that the Title field contains a
- open the video file in Totem 3.34.1-2; the title metadata is displayed in the window title;
- create a screenshot using CtrlAltS or via menu.
If creating a screenshot file succeeds, it’s always
Screenshot of ⟨metadata.title⟩.png iff the title is non-empty, and
Screenshot of ⟨filename⟩.png iff the title is empty. So why not fall back to the latter option if the first one would constitute an invalid file name?
Is there some use-case where the title metadata contains a directory path? I just tried it with a title like
X/Y, and it actually works if I create a directory called
Screenshot of X in my default image directory. The file is saved inside it as
Y.png. That doesn’t feel safe…