summaryrefslogtreecommitdiff
path: root/ext/session/mod_files.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/session/mod_files.c')
-rw-r--r--ext/session/mod_files.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index c4ae79310c..c72997e2c6 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -402,7 +402,12 @@ PS_DESTROY_FUNC(files)
ps_files_close(data);
if (VCWD_UNLINK(buf) == -1) {
- return FAILURE;
+ /* This is a little safety check for instances when we are dealing with a regenerated session
+ * that was not yet written to disk
+ */
+ if (!VCWD_ACCESS(buf, F_OK)) {
+ return FAILURE;
+ }
}
}