Merge lp:~rodrigo-moya/ubuntuone-client/fix-645518 into lp:ubuntuone-client/stable-1-4

Proposed by Rodrigo Moya
Status: Merged
Approved by: Rodrigo Moya
Approved revision: 717
Merged at revision: 717
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/fix-645518
Merge into: lp:ubuntuone-client/stable-1-4
Diff against target: 36 lines (+11/-2)
1 file modified
nautilus/ubuntuone-nautilus.c (+11/-2)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/fix-645518
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+36388@code.launchpad.net

Commit message

- Show an error dialog when deleting a share fails
- Plug a memory leak in shares hash table

Description of the change

- Show an error dialog when deleting a share fails
- Plug a memory leak in shares hash table

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

I'm getting "There was an error removing the share for the folder '(null)'"

We should remove the path or fill the info in.

review: Needs Fixing
717. By Rodrigo Moya

Only show the path in the error message if we got it

Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/ubuntuone-nautilus.c'
2--- nautilus/ubuntuone-nautilus.c 2010-09-22 09:44:02 +0000
3+++ nautilus/ubuntuone-nautilus.c 2010-09-23 15:08:57 +0000
4@@ -122,7 +122,7 @@
5 gchar *key;
6 NautilusFileInfo *file;
7
8- /* Remove emblems from all files in the specified path */
9+ /* Reset emblems from all files in the specified path */
10 g_hash_table_iter_init (&iter, uon->observed);
11 while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &file)) {
12 if (g_str_has_prefix (key, path) || g_strcmp0 (key, path) == 0) {
13@@ -818,7 +818,7 @@
14 uon->connected = FALSE;
15 uon->uploads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
16 uon->downloads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
17- uon->shares = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
18+ uon->shares = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
19 uon->updated = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
20 uon->needsupdating = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
21 uon->observed = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
22@@ -1271,6 +1271,15 @@
23 if (success) {
24 g_hash_table_table_remove (uon->shares, path);
25 ubuntuone_nautilus_reset_emblem (uon, path);
26+ } else {
27+ if (path != NULL) {
28+ ubuntuone_show_error_dialog (uon, _("Error deleting share."),
29+ _("There was an error removing the share for the folder '%s'"),
30+ path);
31+ } else {
32+ ubuntuone_show_error_dialog (uon, _("Error deleting share."),
33+ _("There was an error removing the share"));
34+ }
35 }
36 }
37

Subscribers

People subscribed via source and target branches