diff --git a/examples/untar.c b/examples/untar.c index 8d43272..843a2fa 100644 --- a/examples/untar.c +++ b/examples/untar.c @@ -88,6 +88,7 @@ int main(int argc, char** argv) { if (entry.metadata.type == MTAR_DIRECTORY) { + if (!strcmp(entry.metadata.name, ".") || !strcmp(entry.metadata.name, "..")) continue; int status = untar_directory(&entry); if (status != 0) { @@ -223,4 +224,4 @@ int main(int argc, char** argv) } while (1); minitar_close(&mp); return exit_status; -} \ No newline at end of file +}