From a8ca7256cd9e263a410fdfb037f26f5d618799fb Mon Sep 17 00:00:00 2001 From: Anders Blomdell <anders.blomdell@control.lth.se> Date: Wed, 27 Nov 2019 12:33:32 +0100 Subject: [PATCH] Handle deleted and empty files. Obey files location at any tree leaf. --- src/mio.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mio.py b/src/mio.py index b8be77f..4c89f2a 100755 --- a/src/mio.py +++ b/src/mio.py @@ -325,7 +325,9 @@ if __name__ == '__main__': s.value[0])) pass for f in tree._file_: - src = os.path.normpath('%s/%s' % (f._parent._parent.files[0], + if f.delete[0] == 'yes' or f.source[0] == '': + continue + src = os.path.normpath('%s/%s' % (f.files[0:], f.source[0] or f.name[0])) print('%s[f] %s = %s' % (' '*(indent+1), f.name[0], src)) pass -- GitLab