keplerproject/luafilesystem — pull request #28 by moteus (2014-01-08 13:18:39+00:00)
Title: Fix. Prevents double close the same handle (#24)

lfs_unlock_dir can be called multiple times for the same object.
For example if lock:free is called manually.
Then lfs_unlock_dir will be called always
again, as soon as the LOCK_METATABLE is collected by GC.
This can lead to strange file errors later on, like closing
another file, which now has been assigned the same handle...