Check Repo
This commit is contained in:
parent
5c7c3cf237
commit
d13cbcb356
11
checks.go
11
checks.go
|
@ -25,3 +25,14 @@ func checkRootFolder(storage string) {
|
|||
if !seen { log.Fatal("Folder ", path, " is required but not present!") }
|
||||
}
|
||||
}
|
||||
|
||||
func repoExistsIn(storage string, repoId string) map[string]bool {
|
||||
exists_in := map[string]bool{"fs": false, "commits": false, "blocks": false}
|
||||
|
||||
for storageType, _ := range exists_in {
|
||||
if info, err := os.Stat(filepath.Join(storage, storageType, repoId)); err == nil && info.IsDir() {
|
||||
exists_in[storageType] = true
|
||||
}
|
||||
}
|
||||
return exists_in
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue