glibmm r678 - in trunk: . gio/src
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r678 - in trunk: . gio/src
- Date: Sun, 29 Jun 2008 10:28:26 +0000 (UTC)
Author: arminb
Date: Sun Jun 29 10:28:26 2008
New Revision: 678
URL: http://svn.gnome.org/viewvc/glibmm?rev=678&view=rev
Log:
2008-06-28 Armin Burgmeier <armin arbur net>
* gio/src/file.ccg: Pass NULL to the underlying C function for the
etags parameter in various *_replace functions. Otherwise, existing
files are not overwritten.
Modified:
trunk/ChangeLog
trunk/gio/src/file.ccg
Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg (original)
+++ trunk/gio/src/file.ccg Sun Jun 29 10:28:26 2008
@@ -243,7 +243,7 @@
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_file_replace_async(gobj(),
- etag.c_str(),
+ etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
io_priority,
@@ -261,7 +261,7 @@
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_file_replace_async(gobj(),
- etag.c_str(),
+ etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
io_priority,
@@ -1513,7 +1513,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
- Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_replace(gobj(), etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
+ Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_replace(gobj(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1532,7 +1532,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
- Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_replace(gobj(), etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), NULL, &(gerror)));
+ Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_replace(gobj(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), NULL, &(gerror)));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]