-
Notifications
You must be signed in to change notification settings - Fork 2
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
zip::zip_list can return absolute file paths #17
Comments
Great catch, as always, @mpadge. I can fully reproduce this behaviour in my computer as well. Regarding the |
The names are official, and so checking them should be part of |
strip file paths from zip_list; closes #17
The
zip::zip_list()
does not necessarily return file names without paths - see?zip::zip
for details. The following code demonstrates (in a possibly OS-dependent manner, so don't worry if you can't reproduce):Created on 2021-06-21 by the reprex package (v2.0.0.9000)
In such cases, the names of the items read in
import_gtfs
will be the full paths, and the returned object retains those names. Everything works, but any other packages expecting a gtfs feed to have standard names will then fail. This is what happens:Created on 2021-06-21 by the reprex package (v2.0.0.9000)
I'll submit a PR to fix the names once #16 has been merged. The package will then need a final
check_gtfs_format()
orgtfsio_is_valid()
or similar function that confirms that everything has the expected format - that all required tables are present, and that all required columns of required tables are also present. We can worry about that once #16 and this issue have been addressed. 👍The text was updated successfully, but these errors were encountered: