1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

List known repository ids in the info command

This commit is contained in:
Gilbert Chen
2017-12-03 23:36:19 -05:00
parent 9dbf517e8a
commit 2f4e7422ca

View File

@@ -1170,6 +1170,19 @@ func infoStorage(context *cli.Context) {
} else {
config.Print()
}
dirs, _, err := storage.ListFiles(0, "snapshots/")
if err != nil {
duplicacy.LOG_ERROR("STORAGE_LIST", "Failed to list repository ids: %v", err)
return
}
for _, dir := range dirs {
if len(dir) > 0 && dir[len(dir)-1] == '/' {
duplicacy.LOG_INFO("STORAGE_SNAPSHOT", "%s", dir[0:len(dir) - 1])
}
}
}
func main() {