Kirlovon / aloedb

Light, Embeddable, NoSQL database for Deno 🦕
https://deno.land/x/aloedb
MIT License
140 stars 12 forks source link

Can't open database with absolute path #18

Open canac opened 2 years ago

canac commented 2 years ago

First of all, this is a super useful library, so thanks for your work on it!

I'm running into a bug where aloedb can't open databases with absolute paths. getPathDirname('/Users/canac/db.json') returns 'Users/canac' without the leading /, which then causes errors when trying to open the database file. You should just be able to use the native dirname function in the path module instead of a handwritten utility.

canac commented 2 years ago

Would you accept a PR to fix this?