Reduces memory occupation with many files.

This commit is contained in:
Andrea Mazzoleni 2013-02-26 21:26:45 +01:00
parent a41443b6b6
commit b7bedc8b60
5 changed files with 43 additions and 3 deletions

2
scan.c
View file

@ -339,7 +339,7 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state,
tommy_hashdyn_remove_existing(&disk->pathset, &file->pathset);
/* save the new name */
pathcpy(file->sub, sizeof(file->sub), sub);
file_rename(file, sub);
/* reinsert in the set */
tommy_hashdyn_insert(&disk->pathset, &file->pathset, file, file_path_hash(file->sub));