diff options
Diffstat (limited to 'LibGit2Sharp/RepositoryInformation.cs')
-rw-r--r-- | LibGit2Sharp/RepositoryInformation.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/LibGit2Sharp/RepositoryInformation.cs b/LibGit2Sharp/RepositoryInformation.cs index 97588070..7129806b 100644 --- a/LibGit2Sharp/RepositoryInformation.cs +++ b/LibGit2Sharp/RepositoryInformation.cs @@ -9,11 +9,15 @@ namespace LibGit2Sharp { private readonly Repository repo; - internal RepositoryInformation(Repository repo, string posixPath, string posixWorkingDirectoryPath, bool isBare) + internal RepositoryInformation(Repository repo, bool isBare) { this.repo = repo; - Path = PosixPathHelper.ToNative(posixPath); IsBare = isBare; + + string posixPath = NativeMethods.git_repository_path(repo.Handle, GitRepositoryPathId.GIT_REPO_PATH).MarshallAsString(); + string posixWorkingDirectoryPath = NativeMethods.git_repository_path(repo.Handle, GitRepositoryPathId.GIT_REPO_PATH_WORKDIR).MarshallAsString(); + + Path = PosixPathHelper.ToNative(posixPath); WorkingDirectory = PosixPathHelper.ToNative(posixWorkingDirectoryPath); } |