From 7a202e3d600846a2276b2ae329fec0ce29d44311 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Fri, 15 Jul 2016 08:04:58 -0400 Subject: [PATCH] ear: (#1077) Fixed issue on using 'f' option with a file instead of a folder - 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 | 7 ++++++- share/man/man1/ear.1 | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ear/cmd/ear.ec b/ear/cmd/ear.ec index 82efd9f..42cccc3 100644 --- a/ear/cmd/ear.ec +++ b/ear/cmd/ear.ec @@ -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; } diff --git a/share/man/man1/ear.1 b/share/man/man1/ear.1 index e396f08..a6b91b5 100644 --- a/share/man/man1/ear.1 +++ b/share/man/man1/ear.1 @@ -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 -- 1.8.3.1