OSDN Git Service

Fix a bug of not deleting previously added config files on disk
authoryro <yro@google.com>
Wed, 14 Feb 2018 06:06:34 +0000 (22:06 -0800)
committeryro <yro@google.com>
Wed, 14 Feb 2018 06:07:43 +0000 (22:07 -0800)
Bug: 73304022
Test: statsd_test
Change-Id: Ic024d40da97ed79cb405a5da1f0c9abac0436b34

cmds/statsd/src/config/ConfigManager.cpp

index 06ff603..fbb0fdd 100644 (file)
@@ -101,7 +101,7 @@ void ConfigManager::RemoveConfig(const ConfigKey& key) {
 }
 
 void ConfigManager::remove_saved_configs(const ConfigKey& key) {
-    string suffix = StringPrintf("%d-%lld", key.GetUid(), (long long)key.GetId());
+    string suffix = StringPrintf("%d_%lld", key.GetUid(), (long long)key.GetId());
     StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str());
 }