Merge lp:~dobey/ubuntuone-client-gnome/fix-983144-2-0 into lp:ubuntuone-client-gnome/stable-2-0

Proposed by dobey
Status: Merged
Approved by: Zachery Bir
Approved revision: 10
Merged at revision: 10
Proposed branch: lp:~dobey/ubuntuone-client-gnome/fix-983144-2-0
Merge into: lp:ubuntuone-client-gnome/stable-2-0
Diff against target: 45 lines (+8/-2)
1 file modified
nautilus/utils.c (+8/-2)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client-gnome/fix-983144-2-0
Reviewer Review Type Date Requested Status
Zachery Bir (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+102361@code.launchpad.net

Commit message

Ensure a trailing / on the folder path for use in comparisons

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) :
review: Approve
Revision history for this message
Zachery Bir (urbanape) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/utils.c'
2--- nautilus/utils.c 2011-10-07 20:39:02 +0000
3+++ nautilus/utils.c 2012-04-17 17:31:25 +0000
4@@ -1,3 +1,4 @@
5+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
6 /*
7 * UbuntuOne Nautilus plugin
8 *
9@@ -41,6 +42,10 @@
10 SyncdaemonInterface *interface;
11 gboolean result = TRUE, has_shares = FALSE, has_published = FALSE;
12 GString *question = NULL;
13+ gchar *folder_path = NULL;
14+
15+ folder_path = g_build_filename (syncdaemon_folder_info_get_path (folder_info),
16+ G_DIR_SEPARATOR_S, NULL);
17
18 question = g_string_new (_("This folder contains shared folders and/or published files:\n\n"));
19
20@@ -53,7 +58,7 @@
21 SyncdaemonShareInfo *share_info = SYNCDAEMON_SHARE_INFO (l->data);
22
23 if (g_str_has_prefix (syncdaemon_share_info_get_path (share_info),
24- syncdaemon_folder_info_get_path (folder_info))
25+ folder_path)
26 && syncdaemon_share_info_get_accepted (share_info)) {
27 has_shares = TRUE;
28
29@@ -76,7 +81,7 @@
30 const gchar *path;
31
32 path = syncdaemon_file_info_get_path (SYNCDAEMON_FILE_INFO (l->data));
33- if (g_str_has_prefix (path, syncdaemon_folder_info_get_path (folder_info))) {
34+ if (g_str_has_prefix (path, folder_path)) {
35 has_published = TRUE;
36
37 question = g_string_append (question, "\t- ");
38@@ -109,6 +114,7 @@
39
40 /* Free memory */
41 g_string_free (question, TRUE);
42+ g_free (folder_path);
43
44 return result;
45 }

Subscribers

People subscribed via source and target branches

to all changes: