Bugfix cache file
This commit is contained in:
@ -45,8 +45,10 @@ int cache_process() {
|
|||||||
mkdir("/var/necronda-server", 0655);
|
mkdir("/var/necronda-server", 0655);
|
||||||
|
|
||||||
FILE *cache_file = fopen("/var/necronda-server/cache", "rb");
|
FILE *cache_file = fopen("/var/necronda-server/cache", "rb");
|
||||||
fread(cache, sizeof(cache_entry), FILE_CACHE_SIZE , cache_file);
|
if (cache_file != NULL) {
|
||||||
fclose(cache_file);
|
fread(cache, sizeof(cache_entry), FILE_CACHE_SIZE, cache_file);
|
||||||
|
fclose(cache_file);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < FILE_CACHE_SIZE; i++) {
|
for (int i = 0; i < FILE_CACHE_SIZE; i++) {
|
||||||
cache[i].is_updating = 0;
|
cache[i].is_updating = 0;
|
||||||
|
Reference in New Issue
Block a user