Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 2142752

Browse files
committed
Merge pull request #145 from github/shana/107-default-path
Update the default clone path and don't cache it
2 parents 9558a1f + 2533eff commit 2142752

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/GitHub.App/Extensions/EnvironmentExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,10 @@ public static string GetUserDocumentsPathForApplication(this Rothko.IEnvironment
2525
{
2626
return Path.Combine(environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), ApplicationInfo.ApplicationName);
2727
}
28+
29+
public static string GetUserRepositoriesPath(this Rothko.IEnvironment environment)
30+
{
31+
return Path.Combine(environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Source", "Repos");
32+
}
2833
}
2934
}

src/GitHub.App/Services/RepositoryCloneService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace GitHub.Services
1515
/// by Team Explorer.
1616
/// </summary>
1717
[Export(typeof(IRepositoryCloneService))]
18-
[PartCreationPolicy(CreationPolicy.Shared)]
18+
[PartCreationPolicy(CreationPolicy.NonShared)]
1919
public class RepositoryCloneService : IRepositoryCloneService
2020
{
2121
static readonly Logger log = LogManager.GetCurrentClassLogger();
@@ -30,7 +30,7 @@ public RepositoryCloneService(IOperatingSystem operatingSystem, IVSServices vsse
3030
this.operatingSystem = operatingSystem;
3131
this.vsservices = vsservices;
3232

33-
defaultClonePath = GetLocalClonePathFromGitProvider(operatingSystem.Environment.GetUserDocumentsPathForApplication());
33+
defaultClonePath = GetLocalClonePathFromGitProvider(operatingSystem.Environment.GetUserRepositoriesPath());
3434
}
3535

3636
public IObservable<Unit> CloneRepository(string cloneUrl, string repositoryName, string repositoryPath)

0 commit comments

Comments
 (0)