Removes support to symlink to dirs in Windows. They are different than symlinks to files.

This commit is contained in:
Andrea Mazzoleni 2013-02-28 21:56:02 +01:00
parent 6da21cdbd9
commit 3cd7b4ee03
8 changed files with 68 additions and 48 deletions

View file

@ -1109,7 +1109,7 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
continue;
}
if (link_is_hardlink(link)) {
if (link_flag_has(link, FILE_IS_HARDLINK)) {
/* stat the link */
pathprint(path, sizeof(path), "%s%s", disk->dir, link->sub);
ret = stat(path, &st);
@ -1196,7 +1196,7 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
}
/* create it */
if (link_is_hardlink(link)) {
if (link_flag_has(link, FILE_IS_HARDLINK)) {
ret = hardlink(pathto, path);
if (ret != 0) {
fprintf(stderr, "Error writing hardlink '%s'. %s.\n", path, strerror(errno));