Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 23d36a63 authored by Rob Swindell's avatar Rob Swindell 💬

Fix delfiles() to delete files starting with '.' (that match the pattern)

glob() by default, doesn't include 'dot files', so include the GLOB_PERIOD
flag so that when deleting all files in a directory (e.g. node1/temp/*), any
files starting with a dot will be deleted too.
parent d5881f9b
......@@ -757,7 +757,7 @@ long delfiles(const char *inpath, const char *spec, size_t keep)
else
strcpy(path,inpath);
strcat(path,spec);
glob(path,0,NULL,&g);
glob(path, GLOB_PERIOD, NULL, &g);
free(path);
if(keep >= g.gl_pathc)
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment