Merge lp:~rye/ubuntuone-client/fix-immediate-sync-emblem into lp:ubuntuone-client

Proposed by Roman Yepishev
Status: Merged
Approved by: dobey
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~rye/ubuntuone-client/fix-immediate-sync-emblem
Merge into: lp:ubuntuone-client
Diff against target: 18 lines (+7/-1)
1 file modified
nautilus/ubuntuone-nautilus.c (+7/-1)
To merge this branch: bzr merge lp:~rye/ubuntuone-client/fix-immediate-sync-emblem
Reviewer Review Type Date Requested Status
dobey (community) Approve
Eric Casteleijn (community) Approve
Tim Cole (community) Approve
Review via email: mp+16163@code.launchpad.net

Commit message

Check that the hashes aren't empty strings before comparing

To post a comment you must log in.
Revision history for this message
Tim Cole (tcole) :
review: Approve
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Looks good, tests pass

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
dobey (dobey) wrote :

You need to sign the contributor agreement. http://www.canonical.com/contributors

Thanks!

review: Needs Fixing
Revision history for this message
dobey (dobey) :
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 2009-10-13 14:20:27 +0000
3+++ nautilus/ubuntuone-nautilus.c 2009-12-14 21:04:13 +0000
4@@ -795,7 +795,13 @@
5 server = g_hash_table_lookup (metadata, "server_hash");
6
7 new_path = g_strdup (path);
8- if (local && server && strcmp (local, server) == 0)
9+
10+ gboolean is_updated = local && server &&
11+ strlen (local) > 0 &&
12+ strlen (server) > 0 &&
13+ strcmp (local, server) == 0;
14+
15+ if (is_updated)
16 g_hash_table_replace (uon->updated, new_path, new_path);
17 else
18 g_hash_table_replace (uon->needsupdating, new_path, new_path);

Subscribers

People subscribed via source and target branches