8000 Fixing the error with the clone button by StanleyGoldman · Pull Request #2322 · 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.

Fixing the error with the clone button #2322

Merged
merged 1 commit into from
Apr 10, 2019
Merged

Fixing the error with the clone button #2322

merged 1 commit into from
Apr 10, 2019

Conversation

StanleyGoldman
Copy link
Contributor
@StanleyGoldman StanleyGoldman commented Apr 10, 2019

In #2316 @ 1d8e3e8

I made the determination that DestinationDirectoryEmpty should be used responsibly and should assume the directory it is checking actually exists. The caller of the function should've done their homework and inspected that the directory exists, before asking if it is empty.

That "fix" exposes the very simple bug of a misplaced parenthesis.

Previously we were checking !service.DestinationDirectoryExists(path) and because of the misplaced parenthesis and the unoptimized code, we were calling !service.DestinationDirectoryExists(path) a second time. The second time it would have the desired effect.

@StanleyGoldman StanleyGoldman merged commit 98a843b into master Apr 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0