Fix live sync.

The refactor to use StructOpt instead of plain Clap had some absolute
vs relative path issues that slipped through. This commit adds getters
to each StructOpt struct that exposes an explicitly absolute version
of each path value.
This commit is contained in:
Lucien Greathouse
2019-12-18 17:52:16 -08:00
parent dd592d1d6d
commit f2584cf807
4 changed files with 44 additions and 4 deletions

View File

@@ -35,13 +35,14 @@ pub fn upload(options: UploadCommand) -> Result<(), UploadError> {
fn upload_inner(options: UploadCommand) -> Result<(), Error> {
let cookie = options
.cookie
.clone()
.or_else(get_auth_cookie)
.ok_or(Error::NeedAuthCookie)?;
log::trace!("Constructing in-memory filesystem");
let vfs = Vfs::new(RealFetcher::new(WatchMode::Disabled));
let (_maybe_project, tree) = common_setup::start(&options.project, &vfs);
let (_maybe_project, tree) = common_setup::start(&options.absolute_project(), &vfs);
let root_id = tree.get_root_id();
let mut buffer = Vec::new();