From 2b09b2d27ae94495d107b3da8bdfd4250557d06e Mon Sep 17 00:00:00 2001 From: Lertsenem Date: Sat, 28 Nov 2015 13:11:27 +0100 Subject: [PATCH] Adding trailing slashes when listing directories When listing backuped files, it was difficult to discriminate beytween files and directories. Well, not anymore ! --- persoconf/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/persoconf/main.py b/persoconf/main.py index e387994..0130ee9 100755 --- a/persoconf/main.py +++ b/persoconf/main.py @@ -402,7 +402,10 @@ if args.command == "list": # Print the files too if asked so if args.show_files: for f in app_list[app].files: - print("\t%s" % f) + if os.path.isdir(persoconf.path + "/" + app + "/" + f): + print("\t%s/" % f) + else: + print("\t%s" % f) # Some apps were specified, so we list them with their files else: @@ -416,7 +419,10 @@ if args.command == "list": # Print the app files for f in app_list[app].files: - print("\t%s" % f) + if os.path.isdir(persoconf.path + "/" + app + "/" + f): + print("\t%s/" % f) + else: + print("\t%s" % f) # DELETE COMMAND