Remote path must be absolute

pull/10/head
Dennis Schwerdel 2017-06-20 10:50:02 +02:00
parent 3b50267155
commit e3ed5f628d
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ This project follows [semantic versioning](http://semver.org).
* [added] Added support for xattrs in fuse mount * [added] Added support for xattrs in fuse mount
* [modified] Also documenting common flags in subcommands * [modified] Also documenting common flags in subcommands
* [modified] Using repository aliases (**conversion needed**) * [modified] Using repository aliases (**conversion needed**)
* [modified] Remote path must be absolute
### v0.3.2 (2017-05-11) ### v0.3.2 (2017-05-11)

View File

@ -287,6 +287,10 @@ pub fn run() -> Result<(), ErrorCode> {
} }
match args { match args {
Arguments::Init{repo_path, bundle_size, chunker, compression, encryption, hash, remote_path} => { Arguments::Init{repo_path, bundle_size, chunker, compression, encryption, hash, remote_path} => {
if ! Path::new(&remote_path).is_absolute() {
error!("The remote path of a repository must be absolute.");
return Err(ErrorCode::InvalidArgs)
}
let mut repo = checked!(Repository::create(repo_path, Config { let mut repo = checked!(Repository::create(repo_path, Config {
bundle_size: bundle_size, bundle_size: bundle_size,
chunker: chunker, chunker: chunker,