Open suvayu opened 3 years ago
@suvayu, it seems that ensuring POSIX causes dpkg.read_pkg()
to fail on datapackages with inline data (and therefore no path specified). Here is an example: https://github.com/MaREI-EPMG/ireland-carbon-budget-scenarios-2021/security
I'm not surprised since I never tested with inline data :(. Do you get KeyError
of some kind?
I'm employed elsewhere now, so I need to find some free time outside of work to fix this. Probably not a big fix though.
Thanks a lot! yes, it is complaining that path
is missing.
I've just submitted a pull request removing a windows specific check for posix. It seems no longer needed (?)
Hi @olejandro I fixed the issue with #26, please have a look if it works for you.
The datapackage spec requires all paths in the package metadata to be POSIX paths, however the implementation doesn't enforce this in a platform independent manner, so some functions when run on Window can generate path strings like
"path_to\\data.csv"
. This poses two problems:Two separate resolutions are required:
sark.dpkg._ensure_posix
)Path(..).samefile(..)