mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Remove stale snapshot link if renaming device link fails on Windows
This commit is contained in:
parent
fa8913a759
commit
35b4d4b2ed
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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue