mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 06:10:13 -05:00
Remove stale snapshot link if renaming device link fails on Windows
This commit is contained in:
parent
890d08c6dc
commit
00ccfd0586
1 changed files with 2 additions and 0 deletions
|
|
@ -671,6 +671,8 @@ int fssnapshot_rename(const struct fssnapshot_struct* fss, const char* old_name,
|
||||||
|
|
||||||
if (windows_rename(old_link, new_link) != 0) {
|
if (windows_rename(old_link, new_link) != 0) {
|
||||||
log_error(errno, "Error renaming '%s' to '%s'. %s.\n", old_link, new_link, strerror(errno));
|
log_error(errno, "Error renaming '%s' to '%s'. %s.\n", old_link, new_link, strerror(errno));
|
||||||
|
/* remove as not valid anymore */
|
||||||
|
windows_delete_link(fss, old_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue