Skip to content

Platform independent path comparison #17

@suvayu

Description

@suvayu

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:

  1. corrupt/non-conformant package metadata maybe written
  2. path comparisons may fail on some OS combinationss (when package creation and the path comparison are not happening on the same OS).

Two separate resolutions are required:

  • ensure paths in the metadata are POSIX paths (implemented in sark.dpkg._ensure_posix)
  • a uniform interface to do path comparisons
    1. if the files are same, aka, Path(..).samefile(..)
    2. if two relative paths are same (may not point to the same file, as depends on base path)

Metadata

Metadata

Assignees

Labels

metadataspecImprove Frictionless Data specification support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions