[nautilus] batch-rename-dialog: disable metadata for illegal metadata chars



commit 57179d6665f076e2fa62fd3a2d4130269f6fc83d
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date:   Thu Oct 27 23:11:42 2016 +0300

    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771070

 src/nautilus-batch-rename-utilities.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-batch-rename-utilities.c b/src/nautilus-batch-rename-utilities.c
index 9349666..bac61cb 100644
--- a/src/nautilus-batch-rename-utilities.c
+++ b/src/nautilus-batch-rename-utilities.c
@@ -924,7 +924,10 @@ on_cursor_callback (GObject      *object,
                 break;
             }
 
-            if (!current_metadata)
+            /* TODO: Figure out how to inform the user of why the metadata is
+             * unavailable when one or more contains the unallowed character "/"
+             */
+            if (!current_metadata || g_strrstr (current_metadata, "/"))
             {
                 remove_metadata (query_data,
                                  metadata_type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]