Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Documentation: don't reference non-existent 'git-cvsapplycommit'
[gitweb.git]
/
builtin-apply.c
diff --git
a/builtin-apply.c
b/builtin-apply.c
index a5d612655f82e071c8e7d961660a6f1d562f6f40..db5272245569f4080a07cdb3a2aacd2c0cbda38c 100644
(file)
--- a/
builtin-apply.c
+++ b/
builtin-apply.c
@@
-2416,8
+2416,7
@@
static void create_one_file(char *path, unsigned mode, const char *buf, unsigned
* used to be.
*/
struct stat st;
- errno = 0;
- if (!lstat(path, &st) && S_ISDIR(st.st_mode) && !rmdir(path))
+ if (!lstat(path, &st) && (!S_ISDIR(st.st_mode) || !rmdir(path)))
errno = EEXIST;
}