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
commit cea7c41023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,12 @@ func ClientFstore(r repo.LockedRepo) (dtypes.ClientFilestore, error) {
} }
blocks := namespace.Wrap(clientds, datastore.NewKey("blocks")) 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 fm.AllowFiles = true
// TODO: fm.AllowUrls (needs more code in client import) // TODO: fm.AllowUrls (needs more code in client import)