10000 Allow cloning of repositories into empty directories by YuPeiHenry · Pull Request #2316 · github/VisualStudio · GitHub
[go: up one dir, main page]

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

Allow cloning of repositories into empty directories #2316

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DestinationDirectoryEmpty is (should be) used responsibly and not cal…
…led on directories that don't exist
  • Loading branch information
StanleyGoldman committed Apr 8, 2019
commit 1d8e3e87c81b6ee9ed1b98ddfa3ac9144e1976c5
2 changes: 1 addition & 1 deletion src/GitHub.App/Services/RepositoryCloneService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public async Task CloneRepository(
public bool DestinationDirectoryExists(string path) => operatingSystem.Directory.DirectoryExists(path);

/// <inheritdoc/>
public bool DestinationDirectoryEmpty(string path) => !DestinationDirectoryExists(path) || operatingSystem.Directory.GetDirectory(path).IsEmpty;
public bool DestinationDirectoryEmpty(string path) => operatingSystem.Directory.GetDirectory(path).IsEmpty;

/// <inheritdoc/>
public bool DestinationFileExists(string path) => operatingSystem.File.Exists(path);
Expand Down
0