Mercurial > hg > index.cgi
diff lwar/main.c @ 427:45df37e81741
Add option to ignore paths when extracting or adding files with lwar
Add option to lwar to strip path names from filenames when objects are added
to an archive. Also strip path names from objects when extracting them, if
present.
author | David Flamand <dlflamand@gmail.com> |
---|---|
date | Tue, 15 Nov 2016 21:43:33 -0700 |
parents | 221b5f58d8ad |
children | c5841e2c745d |
line wrap: on
line diff
--- a/lwar/main.c Thu Nov 03 21:44:32 2016 -0600 +++ b/lwar/main.c Tue Nov 15 21:43:33 2016 -0700 @@ -52,6 +52,11 @@ debug_level++; break; + case 'f': + // filename only, no path + filename_flag++; + break; + case 'a': // add members operation = LWAR_OP_ADD; @@ -111,6 +116,8 @@ "Create new archive (or truncate existing one)" }, { "merge", 'm', 0, 0, "Add the contents of archive arguments instead of the archives themselves" }, + { "filename", 'f', 0, 0, + "Prevent the path from being archived" }, { "debug", 'd', 0, 0, "Set debug mode"}, { 0 }