Fix bugs deleting temporary files and their containing directory. - pspp.git - GNU PSPP

index : pspp.git
GNU PSPP
summary refs log tree commit diff
path: root/src/libpspp/ext-array.c
diff options
context:
space:
mode:
authorJohn Darrington <john@darrington.wattle.id.au>2011年07月01日 18:20:42 +0200
committerJohn Darrington <john@darrington.wattle.id.au>2011年07月01日 18:20:42 +0200
commit228b83840e3f053aecfa9feac395fb6855adf044 (patch)
tree63bf490c2fc29085658cd77bd4cc1c5148372526 /src/libpspp/ext-array.c
parent6905ebaf7790cf797d424b13959c3f96e9c515aa (diff)
downloadpspp-228b83840e3f053aecfa9feac395fb6855adf044.tar.gz
Fix bugs deleting temporary files and their containing directory.
The clean_temp module provided by gnulib doesn't cleanup on program exit. We must do that ourselves. Secondly, the close_temp_file function was supposed to remove the file, but didn't do that. Thirdly, files were not being registered with the clean_temp module on creation. This change fixes these problems.
Diffstat (limited to 'src/libpspp/ext-array.c')
-rw-r--r--src/libpspp/ext-array.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libpspp/ext-array.c b/src/libpspp/ext-array.c
index 68bbe954f..57ff8e4a7 100644
--- a/src/libpspp/ext-array.c
+++ b/src/libpspp/ext-array.c
@@ -69,7 +69,7 @@ ext_array_destroy (struct ext_array *ea)
{
ok = !ext_array_error (ea);
if (ea->file != NULL)
- fclose (ea->file);
+ close_temp_file (ea->file);
free (ea);
}
return ok;
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 21:38:56 +0000

AltStyle によって変換されたページ (->オリジナル) /