From 4b1b1b8bb647a17421101a620cbfb28f99a8454c Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sun, 16 Jun 2024 12:52:53 +0000 Subject: [PATCH] Bug 1902341 - Increase screenshots fallback filename length for Windows. r=sfoster Differential Revision: https://phabricator.services.mozilla.com/D213609 UltraBlame original commit: cadbd1d64feb46499084bde1362c1b43904e9958 --- .../components/screenshots/fileHelpers.mjs | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/browser/components/screenshots/fileHelpers.mjs b/browser/components/screenshots/fileHelpers.mjs index 95468185f2623..9f9ba62992f7d 100644 --- a/browser/components/screenshots/fileHelpers.mjs +++ b/browser/components/screenshots/fileHelpers.mjs @@ -137,6 +137,16 @@ MAX_PATH_LENGTH_WINDOWS ; / / +Windows +allows +255 +character +filenames +in +the +filepicker +/ +/ macOS has a @@ -163,12 +173,6 @@ MAX_FILENAME_LENGTH = 255 ; -export -const -FALLBACK_MAX_FILENAME_LENGTH -= -64 -; ChromeUtils . defineESModuleGetters @@ -302,14 +306,15 @@ directory exists . Otherwise -we -just -return -a +Windows +allows * -fallback -filename -length +255 +character +filenames +in +the +filepicker . * * @@ -346,6 +351,10 @@ null { if ( +! +downloadDir +| +| AppConstants . platform @@ -361,11 +370,6 @@ return MAX_FILENAME_LENGTH ; } -if -( -downloadDir -) -{ return MAX_PATH_LENGTH_WINDOWS - @@ -376,10 +380,6 @@ length 1 ; } -return -FALLBACK_MAX_FILENAME_LENGTH -; -} / * *