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

fix(ios): tempFilePath called twice if using CameraUsesGeolocation #612

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Jun 19, 2020

Platforms affected

ios

Motivation and Context

When using <preference name="CameraUsesGeolocation" value="true" />, the image is saved twice and calls tempFilePath, which could cause an infinite loop as reported on #591 (couldn't reproduce)

Description

Instead of doing as on #592, which put the timestamp check inside the while to fix the possible infinite loop, this PR fixes the problem of the image being saved twice.

It removes the while because it was there for an older code that used an int that was incremented until the file didn't exist and used that int for the image name. Now that uses the timestamp and it's not called twice there is no need for the while.

fixes #591
closes #592

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@jcesarmobile jcesarmobile requested review from timbru31 and erisu June 19, 2020 17:40
@jcesarmobile jcesarmobile merged commit d89c25c into apache:master Jun 25, 2020
@jcesarmobile jcesarmobile deleted the temp-file-twice branch June 25, 2020 16:23
IT-MikeS pushed a commit to OutSystems/cordova-plugin-camera that referenced this pull request Mar 18, 2024
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.

iOS: Infinite loop in tempFilePath (master branch)
1 participant