[evolution-data-server] server_side_source_write(): Fix file relocation.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] server_side_source_write(): Fix file relocation.
- Date: Wed, 13 Jun 2012 02:09:44 +0000 (UTC)
commit 33f643a967f9a2a067423d6672d02101b2f63431
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jun 12 22:01:05 2012 -0400
server_side_source_write(): Fix file relocation.
Use the GFile's basename so we don't drop the '.source' file extension.
libebackend/e-server-side-source.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libebackend/e-server-side-source.c b/libebackend/e-server-side-source.c
index cafa0ee..ace5f7a 100644
--- a/libebackend/e-server-side-source.c
+++ b/libebackend/e-server-side-source.c
@@ -700,17 +700,17 @@ server_side_source_write (ESource *source,
if (replace_file) {
GFile *file;
+ gchar *basename;
gchar *filename;
- gchar *uid;
g_warn_if_fail (priv->write_directory != NULL);
- uid = e_server_side_source_uid_from_file (priv->file, NULL);
- g_warn_if_fail (uid != NULL); /* this should never fail */
- filename = g_build_filename (priv->write_directory, uid, NULL);
+ basename = g_file_get_basename (priv->file);
+ filename = g_build_filename (
+ priv->write_directory, basename, NULL);
file = g_file_new_for_path (filename);
g_free (filename);
- g_free (uid);
+ g_free (basename);
if (!g_file_equal (file, priv->file)) {
g_object_unref (priv->file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]