mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-24 17:06:25 -05:00
Removes unused code.
This commit is contained in:
parent
3caa251d83
commit
35fb2085dc
2 changed files with 0 additions and 26 deletions
|
|
@ -4150,25 +4150,6 @@ void state_write(struct snapraid_state* state)
|
|||
struct snapraid_content* content = i->data;
|
||||
char tmp[PATH_MAX];
|
||||
|
||||
#ifdef USE_BACKUP
|
||||
char backup[PATH_MAX];
|
||||
|
||||
/* if the content file was checked reading it, it's a good candidate */
|
||||
/* to be renamed as backup copy */
|
||||
if (state->checked_read) {
|
||||
pathprint(backup, sizeof(backup), "%s.backup", content->content);
|
||||
if (rename(content->content, backup) != 0) {
|
||||
/* ignore the error for not existing */
|
||||
if (errno != ENOENT) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Error renaming the content file '%s' to '%s' in rename(). %s.\n", content->content, backup, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* now renames the just written copy with the correct name */
|
||||
pathprint(tmp, sizeof(tmp), "%s.tmp", content->content);
|
||||
if (rename(tmp, content->content) != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue