mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 00:48:35 +00:00
only run canonicalize on windows
This commit is contained in:
parent
1142f6cbe8
commit
e93999af8e
1 changed files with 7 additions and 1 deletions
|
|
@ -58,7 +58,13 @@ pub(crate) fn repo(repo_path: &str) -> Result<Repository> {
|
|||
///
|
||||
pub(crate) fn work_dir(repo: &Repository) -> Result<PathBuf> {
|
||||
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());
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue