Skip to content

Commit 4b1b1b8

Browse files
committed
Bug 1902341 - Increase screenshots fallback filename length for Windows. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D213609 UltraBlame original commit: cadbd1d64feb46499084bde1362c1b43904e9958
1 parent f0424a9 commit 4b1b1b8

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

browser/components/screenshots/fileHelpers.mjs

+22-22
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ MAX_PATH_LENGTH_WINDOWS
137137
;
138138
/
139139
/
140+
Windows
141+
allows
142+
255
143+
character
144+
filenames
145+
in
146+
the
147+
filepicker
148+
/
149+
/
140150
macOS
141151
has
142152
a
@@ -163,12 +173,6 @@ MAX_FILENAME_LENGTH
163173
=
164174
255
165175
;
166-
export
167-
const
168-
FALLBACK_MAX_FILENAME_LENGTH
169-
=
170-
64
171-
;
172176
ChromeUtils
173177
.
174178
defineESModuleGetters
@@ -302,14 +306,15 @@ directory
302306
exists
303307
.
304308
Otherwise
305-
we
306-
just
307-
return
308-
a
309+
Windows
310+
allows
309311
*
310-
fallback
311-
filename
312-
length
312+
255
313+
character
314+
filenames
315+
in
316+
the
317+
filepicker
313318
.
314319
*
315320
*
@@ -346,6 +351,10 @@ null
346351
{
347352
if
348353
(
354+
!
355+
downloadDir
356+
|
357+
|
349358
AppConstants
350359
.
351360
platform
@@ -361,11 +370,6 @@ return
361370
MAX_FILENAME_LENGTH
362371
;
363372
}
364-
if
365-
(
366-
downloadDir
367-
)
368-
{
369373
return
370374
MAX_PATH_LENGTH_WINDOWS
371375
-
@@ -376,10 +380,6 @@ length
376380
1
377381
;
378382
}
379-
return
380-
FALLBACK_MAX_FILENAME_LENGTH
381-
;
382-
}
383383
/
384384
*
385385
*

0 commit comments

Comments
 (0)