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
=== modified file 'nautilus/ubuntuone-nautilus.c'
--- nautilus/ubuntuone-nautilus.c 2010-09-22 09:44:02 +0000
+++ nautilus/ubuntuone-nautilus.c 2010-09-23 15:08:57 +0000
@@ -122,7 +122,7 @@
122 gchar *key;122 gchar *key;
123 NautilusFileInfo *file;123 NautilusFileInfo *file;
124124
125 /* Remove emblems from all files in the specified path */125 /* Reset emblems from all files in the specified path */
126 g_hash_table_iter_init (&iter, uon->observed);126 g_hash_table_iter_init (&iter, uon->observed);
127 while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &file)) {127 while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &file)) {
128 if (g_str_has_prefix (key, path) || g_strcmp0 (key, path) == 0) {128 if (g_str_has_prefix (key, path) || g_strcmp0 (key, path) == 0) {
@@ -818,7 +818,7 @@
818 uon->connected = FALSE;818 uon->connected = FALSE;
819 uon->uploads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);819 uon->uploads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
820 uon->downloads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);820 uon->downloads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
821 uon->shares = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);821 uon->shares = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
822 uon->updated = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);822 uon->updated = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
823 uon->needsupdating = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);823 uon->needsupdating = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
824 uon->observed = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);824 uon->observed = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
@@ -1271,6 +1271,15 @@
1271 if (success) {1271 if (success) {
1272 g_hash_table_table_remove (uon->shares, path);1272 g_hash_table_table_remove (uon->shares, path);
1273 ubuntuone_nautilus_reset_emblem (uon, path);1273 ubuntuone_nautilus_reset_emblem (uon, path);
1274 } else {
1275 if (path != NULL) {
1276 ubuntuone_show_error_dialog (uon, _("Error deleting share."),
1277 _("There was an error removing the share for the folder '%s'"),
1278 path);
1279 } else {
1280 ubuntuone_show_error_dialog (uon, _("Error deleting share."),
1281 _("There was an error removing the share"));
1282 }
1274 }1283 }
1275}1284}
12761285

Subscribers

People subscribed via source and target branches