ls output is sorted by default

This commit is contained in:
Michel Oosterhof 2015-02-01 07:56:07 +00:00
parent 8546df235d
commit 2ab31983bb
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class command_ls(HoneyPotCommand):
def do_ls_normal(self, path):
try:
files = self.honeypot.fs.get_path(path)
files.sort()
except:
self.honeypot.writeln(
'ls: cannot access %s: No such file or directory' % path)
@ -76,6 +77,7 @@ class command_ls(HoneyPotCommand):
def do_ls_l(self, path):
try:
files = self.honeypot.fs.get_path(path)[:]
files.sort()
except:
self.honeypot.writeln(
'ls: cannot access %s: No such file or directory' % path)