summaryrefslogtreecommitdiff
path: root/gio/src/file.ccg
diff options
context:
space:
mode:
authorArmin Burgmeier <armin@arbur.net>2008-07-02 16:42:19 +0000
committerArmin Burgmeier <arminb@src.gnome.org>2008-07-02 16:42:19 +0000
commit897697458cda506284a7605c17d9a09b38a9a29b (patch)
tree8e2fc7ed7c7d699c9be62675673d7cc0b44c49e8 /gio/src/file.ccg
parentb6df2c99d55931479a71de5b3492f0deb8928bfa (diff)
downloadglibmm-897697458cda506284a7605c17d9a09b38a9a29b.tar.gz
Pass NULL to the underlying C function for the etags parameter in the
2008-07-02 Armin Burgmeier <armin@arbur.net> * gio/src/file.ccg: Pass NULL to the underlying C function for the etags parameter in the various replace_contents functions. Also bug #540656. svn path=/trunk/; revision=679
Diffstat (limited to 'gio/src/file.ccg')
-rw-r--r--gio/src/file.ccg16
1 files changed, 8 insertions, 8 deletions
diff --git a/gio/src/file.ccg b/gio/src/file.ccg
index ebba5410..3ff266f0 100644
--- a/gio/src/file.ccg
+++ b/gio/src/file.ccg
@@ -1284,7 +1284,7 @@ void File::replace_contents(const char* contents, gsize length, const std::strin
{
GError* gerror = 0;
gchar* c_etag_new = 0;
- g_file_replace_contents(gobj(), contents, length, etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
+ g_file_replace_contents(gobj(), contents, length, etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1307,7 +1307,7 @@ void File::replace_contents(const char* contents, gsize length, const std::strin
{
GError* gerror = 0;
gchar* c_etag_new = 0;
- g_file_replace_contents(gobj(), contents, length, etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, NULL, &(gerror));
+ g_file_replace_contents(gobj(), contents, length, etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, NULL, &(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1330,7 +1330,7 @@ void File::replace_contents(const std::string& contents, const std::string& etag
{
GError* gerror = 0;
gchar* c_etag_new = 0;
- g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
+ g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1353,7 +1353,7 @@ void File::replace_contents(const std::string& contents, const std::string& etag
{
GError* gerror = 0;
gchar* c_etag_new = 0;
- g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, NULL, &(gerror));
+ g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, NULL, &(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1385,7 +1385,7 @@ File::replace_contents_async(const SlotAsyncReady& slot,
g_file_replace_contents_async(gobj(),
contents,
length,
- etag.c_str(),
+ etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
cancellable->gobj(),
@@ -1409,7 +1409,7 @@ File::replace_contents_async(const SlotAsyncReady& slot,
g_file_replace_contents_async(gobj(),
contents,
length,
- etag.c_str(),
+ etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
NULL,
@@ -1433,7 +1433,7 @@ File::replace_contents_async(const SlotAsyncReady& slot,
g_file_replace_contents_async(gobj(),
contents.c_str(),
contents.size(),
- etag.c_str(),
+ etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
cancellable->gobj(),
@@ -1456,7 +1456,7 @@ File::replace_contents_async(const SlotAsyncReady& slot,
g_file_replace_contents_async(gobj(),
contents.c_str(),
contents.size(),
- etag.c_str(),
+ etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
NULL,