mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Removes unused code.
This commit is contained in:
parent
3caa251d83
commit
35fb2085dc
2 changed files with 0 additions and 26 deletions
|
|
@ -299,13 +299,6 @@ int filter_content(tommy_list* contentlist, const char* path)
|
||||||
if (pathcmp(tmp, path) == 0)
|
if (pathcmp(tmp, path) == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#if USE_BACKUP
|
|
||||||
/* exclude also the ".backup" copy */
|
|
||||||
pathprint(tmp, sizeof(tmp), "%s.backup", content->content);
|
|
||||||
if (pathcmp(tmp, path) == 0)
|
|
||||||
return -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* exclude also the ".lock" file */
|
/* exclude also the ".lock" file */
|
||||||
pathprint(tmp, sizeof(tmp), "%s.lock", content->content);
|
pathprint(tmp, sizeof(tmp), "%s.lock", content->content);
|
||||||
if (pathcmp(tmp, path) == 0)
|
if (pathcmp(tmp, path) == 0)
|
||||||
|
|
|
||||||
|
|
@ -4150,25 +4150,6 @@ void state_write(struct snapraid_state* state)
|
||||||
struct snapraid_content* content = i->data;
|
struct snapraid_content* content = i->data;
|
||||||
char tmp[PATH_MAX];
|
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 */
|
/* now renames the just written copy with the correct name */
|
||||||
pathprint(tmp, sizeof(tmp), "%s.tmp", content->content);
|
pathprint(tmp, sizeof(tmp), "%s.tmp", content->content);
|
||||||
if (rename(tmp, content->content) != 0) {
|
if (rename(tmp, content->content) != 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue