liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error if directory we're trying to create the database in doesn't exist #167

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open a database
2. bazinga!

(we should ditch the standard questions here..)

/*What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.*/

When a database is being opened in a folder which itself does not exist, 
LevelDB errors with a dubious error message:

OpenError: IO error: ./db/root.db/LOCK: No such file or directory
    at [..]/levelup.js:113:25

As this came up quite some times, we discussed the process here; either the 
path will recursively be created or instead an error being thrown indicating 
the specific issue.

We've been talking about this issue on GitHub regarding LevelDOWN / UP [the 
NodeJS bindings for LDB] (https://github.com/rvagg/node-levelup/issues/135) and 
came to the conclusion this would have to be implemented in LevelDB itself.

Of course, I'd welcome a discussion here — thanks!

Original issue reported on code.google.com by kkooporation@gmail.com on 11 May 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Note as requested: this is a specific feature-request and does not apply to the 
broad LevelDB community. Also, this is mostly for convenience.

Original comment by kkooporation@gmail.com on 11 May 2013 at 11:21