[libgsystem] file-utils: gs_file_open_in_tmpdir_at did never retry
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsystem] file-utils: gs_file_open_in_tmpdir_at did never retry
- Date: Thu, 31 Oct 2013 16:44:04 +0000 (UTC)
commit b40878bf364fab284755a488aa2704079efac307
Author: Thomas Haller <thaller redhat com>
Date: Thu Oct 31 14:51:01 2013 +0100
file-utils: gs_file_open_in_tmpdir_at did never retry
In case of creating an existing file name, gs_file_open_in_tmpdir_at did
not retry and failed to create the temporary file (while signalling
success).
This error was found by running Coverity.
Signed-off-by: Thomas Haller <thaller redhat com>
gsystem-file-utils.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index 73d947f..41cd769 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -495,7 +495,8 @@ gs_file_open_in_tmpdir_at (int tmpdir_fd,
_set_error_from_errno (error);
goto out;
}
- break;
+ else if (fd != -1)
+ break;
}
if (i == max_attempts)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]