Unverified Commit 95e79b23 authored by Richard Berger's avatar Richard Berger
Browse files

Keep file permissions while fixing whitespace issues

parent 943d2524
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ def fix_file(path, check_result):
        with open(path, 'r', encoding=check_result['encoding']) as src:
            for line in src:
                print(line.rstrip(), file=out)
    shutil.copymode(path, newfile)
    shutil.move(newfile, path)

def check_folder(directory, config, fix=False, verbose=False):