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

Commit 1d8e3e8

Browse files
DestinationDirectoryEmpty is (should be) used responsibly and not called on directories that don't exist
1 parent 68d7c8f commit 1d8e3e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.App/Services/RepositoryCloneService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public async Task CloneRepository(
236236
public bool DestinationDirectoryExists(string path) => operatingSystem.Directory.DirectoryExists(path);
237237

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

241241
/// <inheritdoc/>
242242
public bool DestinationFileExists(string path) => operatingSystem.File.Exists(path);

0 commit comments

Comments
 (0)