mirror of https://github.com/BOINC/boinc.git
Remove warning about unknown files in the WU's working directory
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@1674 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
f9354e7270
commit
5b42dbbc0a
|
@ -583,25 +583,12 @@ void DC_destroyWU(DC_Workunit *wu)
|
||||||
GDir *dir;
|
GDir *dir;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Remove known files explicitely to avoid the 'unknown file'
|
|
||||||
* warning below */
|
|
||||||
file = _DC_workDirPath(wu, WU_DESC_FILE, FILE_DCAPI);
|
|
||||||
if (file)
|
|
||||||
{
|
|
||||||
unlink(file);
|
|
||||||
g_free(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
dir = g_dir_open(wu->workdir, 0, NULL);
|
dir = g_dir_open(wu->workdir, 0, NULL);
|
||||||
/* The work directory should not contain any extra files, but
|
|
||||||
* just in case */
|
|
||||||
while (dir && (name = g_dir_read_name(dir)))
|
while (dir && (name = g_dir_read_name(dir)))
|
||||||
{
|
{
|
||||||
GString *str = g_string_new(wu->workdir);
|
GString *str = g_string_new(wu->workdir);
|
||||||
g_string_append_c(str, G_DIR_SEPARATOR);
|
g_string_append_c(str, G_DIR_SEPARATOR);
|
||||||
g_string_append(str, name);
|
g_string_append(str, name);
|
||||||
DC_log(LOG_INFO, "Removing unknown file %s",
|
|
||||||
str->str);
|
|
||||||
unlink(str->str);
|
unlink(str->str);
|
||||||
g_string_free(str, TRUE);
|
g_string_free(str, TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue