-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
How can one open an mbtiles database that is stored on a different drive letter than windows?
Given
new MBTiles(path, (err, mbtiles) => { console.log(err); });
I tried the following values for path:
D:\\maps.mbtiles
D://maps.mbtiles
file:///D:\\maps.mbtiles
file://D:\\maps.mbtiles
\\\\D:\\maps.mbtiles
\\D:\\maps.mbtiles
The file exists (I can fs.stat() the file), I can even read it withfs.readFile(). Just node-mbtiles doesn't seem to get along with it.
I have consulted the source and it seems that on line 83 in mbiltes.js it uses uri.pathname to parse the input file, which does not include a drive letter.
Any ideas how to get it working?
EDIT:
How about using url.fileURLToPath(dbPath) instead of using uri.pathname?
Metadata
Metadata
Assignees
Labels
No labels