Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recalculate hash if it exists and file is unmodified #140

Merged
merged 1 commit into from Sep 12, 2019

Conversation

larowlan
Copy link
Contributor

@larowlan larowlan commented Aug 9, 2019

Fixes #139

@coveralls
Copy link

coveralls commented Aug 9, 2019

Pull Request Test Coverage Report for Build 752

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 99.624%

Totals Coverage Status
Change from base Build 740: 0.01%
Covered Lines: 1326
Relevant Lines: 1331

💛 - Coveralls

if ($this->hash) {
$this->toctouTest();
return $this->hash;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write some tests about these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are existing tests that call getHash()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I see that. Thanks for your reply/explanation :).

@paragonie-scott paragonie-scott merged commit 5584855 into paragonie:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify why ReadOnlyFile::__construct sets $this->hash, but its never re-used
4 participants