Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6de8d53 authored by Cole Faust's avatar Cole Faust
Browse files

Remove duplicate slashes from find_and_copy results

The make version, find-copy-subdir-files, has very
similiar functionality: it adds `| sed "s://:/:g"`
to its results.

Fixes: 223221122
Test: Manually
Change-Id: Iaac96f760d46304aed27a7d31bb4e8bd930c2c55
parent ec63efdd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -479,8 +479,8 @@ def _file_wildcard_exists(file_pattern):

def _find_and_copy(pattern, from_dir, to_dir):
    """Return a copy list for the files matching the pattern."""
    return sorted(["%s/%s:%s/%s" % (
        from_dir, f, to_dir, f) for f in rblf_find_files(from_dir, pattern, only_files=1)])
    return sorted([("%s/%s:%s/%s" % (from_dir, f, to_dir, f))
        .replace("//", "/") for f in rblf_find_files(from_dir, pattern, only_files=1)])

def _findstring(needle, haystack):
    """Equivalent to GNU make's $(findstring)."""