Cache maintenance - paths with spaces not handled
authorColin Clark <colin.clark@cclark.uk>
Sun, 22 Aug 2021 13:48:09 +0000 (14:48 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 22 Aug 2021 13:48:09 +0000 (14:48 +0100)
In the cache maintenance function, put double quotes around the path
variable.

src/cache_maint.c

index 3e96bcb..2b551a8 100644 (file)
@@ -1626,12 +1626,12 @@ static void cache_manager_cache_maintenance_start_cb(GenericDialog *fd, gpointer
                        }
                else
                        {
-                       log_printf("The specified folder can not be found: %s\n", path);
+                       log_printf("The specified folder can not be found: \"%s\"\n", path);
                        }
                }
        else
                {
-               cmd_line = g_strdup_printf("%s --cache-maintenance %s", gq_executable_path, path);
+               cmd_line = g_strdup_printf("%s --cache-maintenance \"%s\"", gq_executable_path, path);
 
                g_spawn_command_line_async(cmd_line, NULL);