diff --git a/tools/check_format.py b/tools/check_format.py index 5ebf90bb6d010..ecaebdd5f47e8 100755 --- a/tools/check_format.py +++ b/tools/check_format.py @@ -177,8 +177,7 @@ def checkFormatVisitor(arg, dir_name, names): if os.path.isfile(target_path): checkFormat("./" + target_path) else: - os.chdir(target_path) - os.path.walk(".", checkFormatVisitor, None) + os.path.walk(target_path, checkFormatVisitor, None) if found_error: print "ERROR: check format failed. run 'tools/check_format.py fix'"