]> git.scottworley.com Git - picsort/commitdiff
Delete/move-to-extra unnamed pics
authorScott Worley <scottworley@scottworley.com>
Tue, 23 Dec 2014 06:07:30 +0000 (22:07 -0800)
committerScott Worley <scottworley@scottworley.com>
Tue, 23 Dec 2014 06:07:30 +0000 (22:07 -0800)
picsorter.js

index a0899552a2f79c799bf64de13e044a881ebe65a5..b07cfc67a500c916fbdd562a05879c7c9c2fc2a8 100644 (file)
@@ -176,16 +176,12 @@ function shell_escape(x) {
 function show_commands() {
   var commands = [];
   $.each(files, function(i, f) {
-    if ("name" in picinfo[f] && picinfo[f].name.length > 0) {
-      var escaped_filename = "'" + shell_escape(f) + "'";
-      if (picinfo[f].deleted == "deleted") {
-        commands.push("shred -u " + escaped_filename);
-        return;
-      }
-      if (picinfo[f].deleted == "extra") {
-        commands.push("mv " + escaped_filename + " \"$EXTRADIR\"");
-        return;
-      }
+    var escaped_filename = "'" + shell_escape(f) + "'";
+    if (picinfo[f].deleted == "deleted") {
+      commands.push("shred -u " + escaped_filename);
+    } else if (picinfo[f].deleted == "extra") {
+      commands.push("mv " + escaped_filename + " \"$EXTRADIR\"");
+    } else if ("name" in picinfo[f] && picinfo[f].name.length > 0) {
       var command = ["pic-mv"];
       if ("exposure" in picinfo[f]) {
         command.push("-e " + picinfo[f].exposure);