mapbox / mapbox/mapnik-omnivore

Windows: Fails for files in root folder

Open
#108 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
44
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Surfaced in:
https://github.com/mapbox/mapbox-studio/issues/1344

mapnik-omnivore cannot detect the file type, if the file is located in the root of the drive, e.g. directly in `C:\`.
I've tested and this is **not** an issue on Linux with files in `/`.

For csv it fails with [`Incompatible filetype`](https://github.com/mapbox/mapnik-omnivore/blob/v4.1.0/index.js#L79).

For geojson it fails with [`Error obtaining layer names`](https://github.com/mapbox/mapnik-omnivore/blob/v4.1.0/lib/datasource-processor.js#L648)

This does not happen if the file is moved into a sub directory.

Contributor guide

Open the contributing guide

Research direction

Start with index.js around line 79 and lib/datasource-processor.js around line 648, then reproduce the CSV and GeoJSON failures using files directly under a Windows drive root. Done means mapnik-omnivore detects both file types there while continuing to work for files in subdirectories and on Linux.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.