+2009-05-21 Nicolas François <nicolas.francois@centraliens.net>
+
+ * libmisc/copydir.c: Added warning for relative symlinks.
+ * libmisc/copydir.c (remove_tree): There is no need to check if
+ the root argument exist. opendir() will report this.
+
2009-05-21 Nicolas François <nicolas.francois@centraliens.net>
* man/faillog.8.xml: Minor updates.
/* If src was a link to an entry of the src_orig directory itself,
* create a link to the corresponding entry in the dst_orig
* directory.
+ * FIXME: This may change a relative link to an absolute link
*/
if (strncmp (oldlink, src_orig, strlen (src_orig)) == 0) {
size_t len = strlen (dst_orig) + strlen (oldlink) - strlen (src_orig) + 1;
return -1;
}
- /* FIXME: why is it unlinked? This is a copy, not a move*/
+ /* FIXME: why is it unlinked? This is a copy, not a move */
if (unlink (src) != 0) {
return -1;
}
struct stat sb;
DIR *dir;
- /*
- * Make certain the directory exists.
- */
-
- if (access (root, F_OK) != 0) {
- return -1;
- }
-
/*
* Open the source directory and read each entry. Every file
* entry in the directory is copied with the UID and GID set