diff --git a/Userland/Utilities/gml-format.cpp b/Userland/Utilities/gml-format.cpp index cd0d441243..84d014bff8 100644 --- a/Userland/Utilities/gml-format.cpp +++ b/Userland/Utilities/gml-format.cpp @@ -30,6 +30,8 @@ ErrorOr format_file(StringView path, bool inplace) } auto formatted_gml = formatted_gml_or_error.release_value(); if (inplace && !read_from_stdin) { + if (formatted_gml == contents) + return true; if (!file->seek(0) || !file->truncate(0)) { warnln("Could not truncate {}: {}", path, file->error_string()); return false;