From f5ba44fd933054ef2924326bba48cef17e0af637 Mon Sep 17 00:00:00 2001 From: Hugo Hurskainen Date: Tue, 9 Jun 2026 15:25:37 +0300 Subject: [PATCH] Suggested fix for the single file special case issue. Defaulting just above the special case, so len(args.keep_tree) no longer hits None --- src/utils/ltfs_ordered_copy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/ltfs_ordered_copy b/src/utils/ltfs_ordered_copy index 5537964e..b5800ffc 100755 --- a/src/utils/ltfs_ordered_copy +++ b/src/utils/ltfs_ordered_copy @@ -336,6 +336,9 @@ if args.DEST == None: logger.error('No destination is specified') exit(2) +if args.keep_tree is None: + args.keep_tree = '' + # Special case: # Copy source is only one file if args.recursive == False and len(args.SOURCE) == 1: @@ -387,9 +390,6 @@ if len(args.SOURCE) == 0: args.SOURCE.append(line.rstrip('\r\n')) logger.log(NOTSET + 1, 'Source: {}'.format(args.SOURCE)) -if args.keep_tree is None: - args.keep_tree = '' - # Create the list of copy item copyq = CopyQueue(logger, args.sort_files) for s in args.SOURCE: