You were trying to restore a library located in a location whose path is longer than specified. That error happens if and only if the path of the library being restored is too long, and it refers to the path to the library not the path to anything inside the library. As can be seen here:
https://github.com/kovidgoyal/calibr...ackend.py#L318
I have changed that error message to include the problem path, so that it is clearer.
And as for your original problem, of a duplicate hardlink causing a spurious file locked message, that was fixed in 1.7, as is documented in the whats new page.