so... unlink doesn't work as expected. I get the following when trying to remove a directory. I get that it's failing because the directory is non-empty, but it probably shouldn't traceback like that.
Additionally, it would be really sweet if I could wildcard (so that I could empty the directory out easily).
As noted below, the help text for unlink appears to be identical to that for "hash".
/ $ unlink "1238440128.1"
Traceback (most recent call last):
File "../../trunk/utilities/cmd_client.py", line 151, in decorator
function(*args, **kwargs)
File "../../trunk/utilities/cmd_client.py", line 579, in do_unlink
self.unlink(node_id)
File "../../trunk/utilities/cmd_client.py", line 332, in unlink
return self.defer_from_thread(_unlink)
File "../../trunk/utilities/cmd_client.py", line 218, in defer_from_thread
result.raiseException()
File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 326, in raiseException
raise self.type, self.value, self.tb
StorageRequestError: NOT_EMPTY
/ $ help unlink
Print the hash of filename.
/ $ help
Documented commands (type help <topic>):
========================================
EOF connect_ssl hash move quit shares
cat disconnect ls oauth_from_keyring_maybe root shell
cd dummy_auth mkdir oauth_from_token rput status
connect get mkfile put set_share unlink
Undocumented commands:
======================
help
/ $ help hash
Print the hash of filename.
/ $ help unlink
Print the hash of filename.
Rick McBride wrote:
> Private bug reported:
>
> so... unlink doesn't work as expected. I get the following when trying
> to remove a directory. I get that it's failing because the directory is
> non-empty, but it probably shouldn't traceback like that.
>
it does what its supposed to do and what you expect it will do. it just
doesnt show it nicely. so lets keep this bug to improve the error
handling in cmd_client (all operations that fail, even in reasonable
ways) show that kind of errors.
Lucio.