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 @@ -866,7 +866,7 @@ <h1>Bruce Theme Builder</h1>
866866
867867 const baseName = file . name . substring ( 0 , file . name . lastIndexOf ( "." ) ) || file . name ;
868868 const blob = await fetch ( imageDataUrl ) . then ( res => res . blob ( ) ) ;
869- const fileName = `${ baseName } .${ fileExtension } ` ;
869+ const fileName = isGuid ( baseName ) ? ` ${ name } . ${ fileExtension } ` : `${ baseName } .${ fileExtension } ` ;
870870 jsonMapping [ name ] = fileName ;
871871 imageFolder . file ( fileName , blob ) ;
872872 totalProcessed ++ ;
@@ -1026,6 +1026,11 @@ <h1>Bruce Theme Builder</h1>
10261026 } ) ;
10271027 }
10281028
1029+ function isGuid ( str ) {
1030+ const guidRegex = / ^ [ 0 - 9 a - f ] { 8 } - [ 0 - 9 a - f ] { 4 } - [ 1 - 5 ] [ 0 - 9 a - f ] { 3 } - [ 8 9 a b ] [ 0 - 9 a - f ] { 3 } - [ 0 - 9 a - f ] { 12 } $ / i;
1031+ return guidRegex . test ( str ) ;
1032+ }
1033+
10291034 createFileInputs ( ) ;
10301035 setupDragAndDrop ( ) ;
10311036 updateColorDisplay ( ) ;
You can’t perform that action at this time.
0 commit comments