diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2006-02-06 01:44:50 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2006-02-06 01:44:50 +0000 |
commit | f481c3c11dfaea24ba1c429f73ad60b3657d4c80 (patch) | |
tree | cc05f2ca251070714e23fcaa63a757af00104f7e /lib/backup-files.c | |
parent | 88e349a35db92b49081ab16509d5935bc21721c6 (diff) | |
download | quilt-f481c3c11dfaea24ba1c429f73ad60b3657d4c80.tar.gz |
- bin/patch-wrapper.in: A wrapper to GNU patch that recognizes the
most common options and mimics GNU patch's behavior and output,
and creates the quilt metadata as if quilt push was used to
apply the patch. When options are used that this wrapper does
not recognize, GNU patch is used directly, and no quilt metadata
will get created.
- lib/backup-files.c: Don't fail if a directory specified with
-B does not exist.
Diffstat (limited to 'lib/backup-files.c')
-rw-r--r-- | lib/backup-files.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/backup-files.c b/lib/backup-files.c index 268fb49..4d6d137 100644 --- a/lib/backup-files.c +++ b/lib/backup-files.c @@ -471,7 +471,7 @@ walk(const char *path, const struct stat *st) int main(int argc, char *argv[]) { - int opt, status=0; + int opt, status = 0; progname = argv[0]; @@ -557,15 +557,17 @@ main(int argc, char *argv[]) } for (; optind < argc; optind++) { if (strcmp(argv[optind], "-") == 0) { + struct stat st; char *dir = strdup(opt_prefix), *d = strrchr(dir, '/'); if (d) *d = '\0'; else d = "."; - status = foreachdir(dir, walk); - if (status == -1) - perror(dir); - + if (stat(dir, &st) == 0) { + status = foreachdir(dir, walk); + if (status == -1) + perror(dir); + } free(dir); } else status = process_file(argv[optind]); |