summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da94faf)
raw | patch | inline | side by side (parent: da94faf)
author | Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> | |
Wed, 25 Apr 2007 14:17:56 +0000 (11:17 -0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 25 Apr 2007 20:15:27 +0000 (13:15 -0700) |
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
entry.c | patch | blob | history |
index 84f78025ff9f24d3ef9b2412894e18f3d9fc1859..b51addbf8d0c766c1800dc5814ce50c35321143e 100644 (file)
--- a/entry.c
+++ b/entry.c
char *name;
if (!dir)
- die("cannot opendir %s", path);
+ die("cannot opendir %s (%s)", path, strerror(errno));
strcpy(pathbuf, path);
name = pathbuf + strlen(path);
*name++ = '/';
continue;
strcpy(name, de->d_name);
if (lstat(pathbuf, &st))
- die("cannot lstat %s", pathbuf);
+ die("cannot lstat %s (%s)", pathbuf, strerror(errno));
if (S_ISDIR(st.st_mode))
remove_subtree(pathbuf);
else if (unlink(pathbuf))
- die("cannot unlink %s", pathbuf);
+ die("cannot unlink %s (%s)", pathbuf, strerror(errno));
}
closedir(dir);
if (rmdir(path))
- die("cannot rmdir %s", path);
+ die("cannot rmdir %s (%s)", path, strerror(errno));
}
static int create_file(const char *path, unsigned int mode)