From eeeef1b669b9dfc6c3d700929a1d5ef5aa296b3f Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 12 Feb 2026 07:53:03 +0000 Subject: [PATCH] cleanup comments --- common/common.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/common.cpp b/common/common.cpp index e5a2a0a579..d2324a04b6 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -740,6 +740,8 @@ bool fs_validate_filename(const std::string & filename, bool allow_subdirs) { if (filename.length() > 255) { // Limit at common largest possible filename on Linux filesystems // to avoid unnecessary further validation + // NOTE: The 255 limit is per filename element on Linux, not the whole path + // On Windows, the limit is commonly 260 for the whole absolute path // (On systems with smaller limits it will be caught by the OS) return false; } @@ -811,7 +813,7 @@ bool fs_validate_filename(const std::string & filename, bool allow_subdirs) { // Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename // Unicode and other whitespace is not affected, only 0x20 space - // This also matches path elements that equal '..' or '.' + // This also matches paths that equal '..' or '.' if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') { return false; }