Skip to content

Wiki: ltfs_ordered_copy example missing --recursive (or script has bug) #553

@talpid

Description

@talpid

In the ltfs_ordered_copy wiki, the third example is:

    Copy directory /foo/ddd and /foo/DDD to directory /bar/

           % ltfs_ordered_copy /foo/ddd /foo/DDD /bar

Reading through the script, however, reveals the following (trimmed for readability):

    # Create the list of copy item
    copyq = CopyQueue(logger, args.sort_files)
    for s in args.SOURCE:
        if os.path.isfile(s):
            (...)
        else:
            logger.log(NOTSET + 1, 'Creating copy item for directory {}'.format(s))
            if args.recursive:
                    (...)
            else:
                logger.warning("omitting directory '{0}'".format(s))

I.e., directories are not copied, unless the --recursive flag is set.

It seems as though the Wiki example is incorrect, unless the intention was to allow copying of directories without recursion (which seems unlikely), in which case there's a bug in the script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    as expectedReported behavior is as expecteddocdocumentation issuewontfix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions