glibmm r680 - in branches/glibmm-2-16: . gio/src
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r680 - in branches/glibmm-2-16: . gio/src
- Date: Wed, 2 Jul 2008 16:45:11 +0000 (UTC)
Author: arminb
Date: Wed Jul 2 16:45:11 2008
New Revision: 680
URL: http://svn.gnome.org/viewvc/glibmm?rev=680&view=rev
Log:
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.
Modified:
branches/glibmm-2-16/ChangeLog
branches/glibmm-2-16/gio/src/file.ccg
Modified: branches/glibmm-2-16/gio/src/file.ccg
==============================================================================
--- branches/glibmm-2-16/gio/src/file.ccg (original)
+++ branches/glibmm-2-16/gio/src/file.ccg Wed Jul 2 16:45:11 2008
@@ -1284,7 +1284,7 @@
{
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 @@
{
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 @@
{
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 @@
{
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 @@
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 @@
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 @@
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 @@
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]