Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

FileResourceLock#unlock_token nil root path and variable not defined #54

wants to merge 3 commits into


None yet
1 participant

pifleo commented Jan 8, 2013


I'm still trying to implement webdav in my app.

When testing lock and unlock with Office I had the following error:
TypeError: can't convert nil into String in file_resource_lock.rb:80:in join
after some research I found that root is not passed to #find_by_token in FileResource#unlock line:262.

Long to find, easy to patch.
But then #unlock as an undefined variable tok, I supposed it was struct.

And finally, its need a little more investigation, but MS Word remove the first and last characters of the token when calling unlock then the store never find any token.
I give a look at what is send to the webdav client and the token seem ok. I don't know enough about webdav and have no clue where to look, maybe Word misinterpret the xml sent or just want to be upsetting.
I made a monkey patch to find the good token.

MS Word generate a lot of lock request and fill the token table for the loaded file. Maybe the destroy action should clean all tokens for a given file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment