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

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.

3 participants