| Index: sync/syncable/syncable_id.cc
|
| diff --git a/sync/syncable/syncable_id.cc b/sync/syncable/syncable_id.cc
|
| index 5cd777ff2eff81f67f70b519eda98417eecd5c60..d50f6cb914043da2f37d4afbb4e9ffcc724b0f1f 100644
|
| --- a/sync/syncable/syncable_id.cc
|
| +++ b/sync/syncable/syncable_id.cc
|
| @@ -35,19 +35,23 @@ string Id::GetServerId() const {
|
|
|
| Id Id::CreateFromServerId(const string& server_id) {
|
| Id id;
|
| - if (server_id == "0")
|
| - id.s_ = "r";
|
| - else
|
| - id.s_ = string("s") + server_id;
|
| + if (!server_id.empty()) {
|
| + if (server_id == "0")
|
| + id.s_ = "r";
|
| + else
|
| + id.s_ = string("s") + server_id;
|
| + }
|
| return id;
|
| }
|
|
|
| Id Id::CreateFromClientString(const string& local_id) {
|
| Id id;
|
| - if (local_id == "0")
|
| - id.s_ = "r";
|
| - else
|
| - id.s_ = string("c") + local_id;
|
| + if (!local_id.empty()) {
|
| + if (local_id == "0")
|
| + id.s_ = "r";
|
| + else
|
| + id.s_ = string("c") + local_id;
|
| + }
|
| return id;
|
| }
|
|
|
|
|