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

fixes bug (error) when not passing url to preProcess or prepInputs call #65

Merged
merged 6 commits into from Nov 2, 2018

Conversation

tati-micheletti
Copy link
Contributor

mainly just inverted two lines and added a NULL to guessed file when url is not passed.

Copy link
Collaborator

@achubaty achubaty left a comment

Choose a reason for hiding this comment

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

url = NULL is not the same as the url being unreachable (if user is offline). To me it looks like the only change needed is line 477 where basename(url) is called. It just needs to handle the url = NULL case.

Your changes result in a NULL file being guessed at even when url is provided but not reachable.

@tati-micheletti
Copy link
Contributor Author

tati-micheletti commented Oct 31, 2018

Hey Alex, I am not sure this would work. Now that I checked it again, the problem is that when url = NULL, grepl("drive.google.com", url) returns logical(0), which in turn, makes the if statement fail. That's why I first test to see if there is an url provided, and if thats TRUE, it tries to guess the file name. I think that the problem is that I thought that url.exists() was to check if the user provided a url... I fixed it now. Will test it right after lunch!

@coveralls
Copy link

coveralls commented Oct 31, 2018

Coverage Status

Coverage decreased (-0.004%) to 78.165% when pulling 55d5a19 on tati-micheletti:development into dded345 on PredictiveEcology:development.

@achubaty achubaty merged commit fbb1ae9 into PredictiveEcology:development Nov 2, 2018
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.

None yet

3 participants