Removes the new .backup feature.

I'm not yet convinced that it's a good idea, because it may
end in unexpected errors if the old content file is used
as it's it.
This commit is contained in:
Andrea Mazzoleni 2014-06-25 22:51:26 +02:00
parent 5dfc67ec18
commit 03fc05e93c
6 changed files with 8 additions and 14 deletions

View file

@ -299,10 +299,12 @@ int filter_content(tommy_list* contentlist, const char* path)
if (pathcmp(tmp, path) == 0)
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 */
pathprint(tmp, sizeof(tmp), "%s.lock", content->content);

View file

@ -4115,6 +4115,8 @@ void state_write(struct snapraid_state* state)
while (i) {
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 */
@ -4131,6 +4133,7 @@ void state_write(struct snapraid_state* state)
}
}
}
#endif
/* now renames the just written copy with the correct name */
pathprint(tmp, sizeof(tmp), "%s.tmp", content->content);