[libgsf] GsfOutfileStdio: allow pre-existing directory.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] GsfOutfileStdio: allow pre-existing directory.
- Date: Fri, 23 Aug 2013 20:19:17 +0000 (UTC)
commit dfd8750bc6d06874d1a05989e091374020cf7cb1
Author: Morten Welinder <terra gnome org>
Date: Fri Aug 23 16:18:52 2013 -0400
GsfOutfileStdio: allow pre-existing directory.
ChangeLog | 5 +++++
NEWS | 3 +++
gsf/gsf-outfile-stdio.c | 2 +-
3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b5f7b4e..ea07689 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-23 Morten Welinder <terra gnome org>
+
+ * gsf/gsf-outfile-stdio.c (gsf_outfile_stdio_new_valist): Allow
+ the directory to exist. Patch from Allin Cottrell. #706219.
+
2013-08-01 Morten Welinder <terra gnome org>
* configure.ac: Post-release bump.
diff --git a/NEWS b/NEWS
index 290c7b8..2605556 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
libgsf 1.14.29
+Allin Cottrell:
+ * Fix problem with GsfOutfileStdio. [#706219]
+
--------------------------------------------------------------------------
libgsf 1.14.28
diff --git a/gsf/gsf-outfile-stdio.c b/gsf/gsf-outfile-stdio.c
index d48e1c1..e98e730 100644
--- a/gsf/gsf-outfile-stdio.c
+++ b/gsf/gsf-outfile-stdio.c
@@ -117,7 +117,7 @@ gsf_outfile_stdio_new_valist (char const *root, GError **err,
{
GsfOutfileStdio *ofs;
- if (0 != g_mkdir (root, 0777)) {
+ if (0 != g_mkdir (root, 0777) && errno != EEXIST) {
if (err != NULL) {
int save_errno = errno;
char *utf8name = g_filename_display_name (root);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]