mirror of https://github.com/desaster/kippo.git
prevent rmdir of non-empty directories
git-svn-id: https://kippo.googlecode.com/svn/trunk@38 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
parent
078904c7a8
commit
536ec915d1
|
@ -93,6 +93,10 @@ class command_rmdir(HoneyPotCommand):
|
|||
def call(self):
|
||||
for f in self.args:
|
||||
path = self.fs.resolve_path(f, self.honeypot.cwd)
|
||||
if len(self.fs.get_path(path)):
|
||||
self.writeln(
|
||||
'rmdir: failed to remove `%s\': Directory not empty' % f)
|
||||
continue
|
||||
try:
|
||||
dir = self.fs.get_path('/'.join(path.split('/')[:-1]))
|
||||
except IndexError:
|
||||
|
|
Loading…
Reference in New Issue