After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771070 - batch rename: Don't fail silently on illegal metadata
batch rename: Don't fail silently on illegal metadata
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.21.x
Other Linux
: Normal normal
: 3.22
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-08 17:13 UTC by Mohammed Sadiq
Modified: 2016-11-04 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pdf file with title 'GNU/Linux' for test (11.35 KB, application/pdf)
2016-09-08 17:13 UTC, Mohammed Sadiq
  Details
batch-rename-dialog: identify conflict for illegal metadata chars (3.18 KB, patch)
2016-10-03 09:21 UTC, Alexandru Pandelea
needs-work Details | Review
batch-rename-dialog: disable metadata for illegal metadata chars (1.33 KB, patch)
2016-10-27 20:42 UTC, Alexandru Pandelea
committed Details | Review

Description Mohammed Sadiq 2016-09-08 17:13:30 UTC
Created attachment 335132 [details]
pdf file with title 'GNU/Linux' for test

Currently no feedback is given if illegal characters are present in metadata. And the rename process silently fails. In this case ideally the user should be informed.

A pdf file is attached with title "GNU/Linux" in case a file is required to test this. This file has to be added to tracker first (tracker index --file filename).
Comment 1 Carlos Soriano 2016-09-08 17:20:52 UTC
oh I didn't think about this... good catch too!
Comment 2 Alexandru Pandelea 2016-10-03 09:21:21 UTC
Created attachment 336796 [details] [review]
batch-rename-dialog: identify conflict for illegal metadata chars

If the metadata has the character "/" the conflict is not identified.

To fix this, rather than looking at the entry text, the new names will
be checked for the unallowed characters and names.
Comment 3 Carlos Soriano 2016-10-03 12:25:00 UTC
Review of attachment 336796 [details] [review]:

Hmm I think it's very unfortunate because we display the error label just under the entry like what's expecting to do, and also we allow to set the metadata even if we can know it's not valid beforehand. So I wonder if instead what we should do is read the metadata for invalid characters and disable the button in the popover instead if that happens (and we will have to figure out how to display why is it not available, we can think different solutions to that for 3.24)
Comment 4 Alexandru Pandelea 2016-10-27 20:42:25 UTC
Created attachment 338639 [details] [review]
batch-rename-dialog: disable metadata for illegal metadata chars

If the metadata has the character "/" the metadata cannot be used.

Rather than showing a conflict when this metadata is used, it should
actually be disabled, because the user will never be able to rename the
files using this metadata.
Comment 5 Carlos Soriano 2016-11-03 10:41:54 UTC
Review of attachment 338639 [details] [review]:

I think for now is good enough, let's go with this, thanks!
Comment 6 Alexandru Pandelea 2016-11-04 10:07:38 UTC
Attachment 338639 [details] pushed as 57179d6 - batch-rename-dialog: disable metadata for illegal metadata chars