summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-apply.c2
-rw-r--r--setup.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 0a0b4a9..da27075 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2508,7 +2508,7 @@ static void write_out_one_result(struct patch *patch, int phase)
* thing: remove the old, write the new
*/
if (phase == 0)
- remove_file(patch, 0);
+ remove_file(patch, patch->is_rename);
if (phase == 1)
create_file(patch);
}
diff --git a/setup.c b/setup.c
index 4945eb3..b55b82c 100644
--- a/setup.c
+++ b/setup.c
@@ -107,7 +107,7 @@ void verify_non_filename(const char *prefix, const char *arg)
if (!lstat(name, &st))
die("ambiguous argument '%s': both revision and filename\n"
"Use '--' to separate filenames from revisions", arg);
- if (errno != ENOENT)
+ if (errno != ENOENT && errno != ENOTDIR)
die("'%s': %s", arg, strerror(errno));
}