File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import typeByExt from '../config/resource-type-by-ext.js';
77
88import logger from '../logger.js' ;
99
10+
1011const MAX_FILENAME_LENGTH = 230 ;
1112const IS_URL = / ^ ( ( h t t p [ s ] ? : ) ? \/ \/ ) / ;
1213
@@ -99,7 +100,11 @@ function getFilenameExtension (filepath) {
99100}
100101
101102function sanitizeFilename ( filename ) {
102- return filenamifySanitizeFilename ( filename , { replacement : '_' , maxLength : MAX_FILENAME_LENGTH } ) ;
103+ const sanitized = filenamifySanitizeFilename ( filename , { replacement : '_' , maxLength : MAX_FILENAME_LENGTH } ) ;
104+ if ( sanitized !== filename ) {
105+ logger . debug ( `[utils] sanitize filename: ${ filename } -> ${ sanitized } ` ) ;
106+ }
107+ return sanitized ;
103108}
104109
105110function normalizeUrl ( u , opts ) {
You can’t perform that action at this time.
0 commit comments