Merge pull request #1761 from dtynn/fix/dtynn/use_abs_path_for_client_filestore

use abs path to construct FileManager
This commit is contained in:
Łukasz Magiera
2020-05-20 12:49:53 +02:00
committed by GitHub
+6 -1
View File
@@ -44,7 +44,12 @@ func ClientFstore(r repo.LockedRepo) (dtypes.ClientFilestore, error) {
}
blocks := namespace.Wrap(clientds, datastore.NewKey("blocks"))
fm := filestore.NewFileManager(clientds, filepath.Dir(r.Path()))
absPath, err := filepath.Abs(r.Path())
if err != nil {
return nil, err
}
fm := filestore.NewFileManager(clientds, filepath.Dir(absPath))
fm.AllowFiles = true
// TODO: fm.AllowUrls (needs more code in client import)