Skip to content

[FEATURE] Add ability to ignore files if they don't exist #253

Description

@linkjay

What / Why

Would be nice if there was a way to specify in the tar options to ignore files if they don't exist.

In my code, I am specifying a list of files that I want to compress into an archive, but it's in a dynamic directory so sometimes the files get removed. This will spit out an error with lstat saying that it does not exist.

When

Simply have an argument in the options table for tar.c

How

Could probably do it and have it almost like a "less strict" mode. When the file is being retrieved for the archive, have a checker that is like if(!fs.existsSync(file)) { return } or something.

Current Behavior

Feeding in a list of files in an array, and having one of them not exist will pass an error.

Expected Behavior

Having an option to specify something like ignoreNotFound should have it just ignore any entries in the array that do not exist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancementnew feature or improvement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions