ear: (#1077) Fixed issue on using 'f' option with a file instead of a folder
authorJerome St-Louis <jerome@ecere.com>
Fri, 15 Jul 2016 12:04:58 +0000 (08:04 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 28 Jul 2016 22:23:31 +0000 (18:23 -0400)
- This was no longer 'crashing' since virtual method checked for null objects but was not doing anything meaningful
- Updated man page to take out known bug

ear/cmd/ear.ec
share/man/man1/ear.1

index 82efd9f..42cccc3 100644 (file)
@@ -209,7 +209,7 @@ static bool AddToArchive(Archive archive, ArchiveDir parentDir, const char * nam
             delete directory;
       }
    }
-   else if(exists)
+   else if(exists && parentDir)
    {
       int ratio;
       uint newPosition;
@@ -234,6 +234,11 @@ static bool AddToArchive(Archive archive, ArchiveDir parentDir, const char * nam
          result = false;
       }
    }
+   else if(exists)
+   {
+      Logf($"'f' is specified but %s is not a folder\n", path);
+      result = false;
+   }
    return result;
 }
 
index e396f08..a6b91b5 100644 (file)
@@ -61,5 +61,3 @@ Resources can be emdedded inside applications and modules from the Project View'
 .SS Miscellaneous Options
 .RS 0
 \fBq\fR  Quiet mode (Add, Refresh, Update, Extract and Extract All)
-.SH KNOWN BUGS
-When using the \fBf\fR command modifier (with Add, Refresh or Update), ear will crash if any of the \fIinput\-paths\fR is a file instead of a folder