diff --git a/asyncgit/src/sync/utils.rs b/asyncgit/src/sync/utils.rs index 5c7d1e5e..25af94cf 100644 --- a/asyncgit/src/sync/utils.rs +++ b/asyncgit/src/sync/utils.rs @@ -58,7 +58,13 @@ pub(crate) fn repo(repo_path: &str) -> Result { /// pub(crate) fn work_dir(repo: &Repository) -> Result { let path = repo.workdir().ok_or(Error::NoWorkDir)?; - Ok(path.canonicalize()?) + + //Note: only canonicalize on windows to support long paths + #[cfg(windows)] + return Ok(path.canonicalize()?); + + #[cfg(not(windows))] + return Ok(path.into()); } ///