changeset 1267:ad13510c8e41

Fix handling of -x option in packed.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 27 May 2015 01:15:59 +0300
parents c43c8e5118a0
children 6fc71b410cc3
files tools/packed.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tools/packed.c	Mon May 25 12:58:37 2015 +0300
+++ b/tools/packed.c	Wed May 27 01:15:59 2015 +0300
@@ -75,7 +75,7 @@
 
 BOOL argHandleOpt(const int optN, char *optArg, char *currArg)
 {
-    (void) optArg;
+    (void) currArg;
     switch (optN)
     {
         case 0:
@@ -122,7 +122,7 @@
         case 9:
             if (nexcFilenames < SET_MAX_FILES)
             {
-                excFilenames[nexcFilenames++] = currArg;
+                excFilenames[nexcFilenames++] = optArg;
             }
             else
             {
@@ -770,11 +770,15 @@
                     match = FALSE;
                     for (i = 0; (i < nsrcFilenames) && !match; i++)
                     {
-                        match = dm_strmatch(node->filename, srcFilenames[i]);
+                        if (dm_strmatch(node->filename, srcFilenames[i]) &&
+                            !dmCheckExcluded(node->filename))
+                            match = TRUE;
                     }
                 }
                 else
-                    match = TRUE;
+                {
+                    match = !dmCheckExcluded(node->filename);
+                }
 
                 if (match && (node->privFlags & PACK_EXTRACTED) == 0)
                 {