piskvorky / sqlitedict

Persistent dict, backed by sqlite3 and pickle, multithread-safe.
Apache License 2.0
1.17k stars 131 forks source link

Support filenames without an explicit path. #10

Closed da4089 closed 10 years ago

da4089 commented 10 years ago

os.path.dirname() returns an empty string if the filename argument has directory component. os.path.exists() fails to find an empty path, so when doing SqliteDict("foo.db") you get an exception.

This commit changes the sanity check to support a filename without an explicit path component.

piskvorky commented 10 years ago

Nice, thanks David!