File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 2323
2424static void createSubfolders (const char * fileName )
2525{
26- FF_STRBUF_AUTO_DESTROY path = ffStrbufCreate ();
27-
26+ char path [PATH_MAX ];
2827 char * token = NULL ;
28+ char * pathTail = path ;
2929 while ((token = strchr (fileName , '/' )) != NULL )
3030 {
31- ffStrbufAppendNS (& path , (uint32_t )(token - fileName + 1 ), fileName );
32- mkdir (path .chars , S_IRWXU | S_IRGRP | S_IROTH );
31+ uint32_t length = (uint32_t )(token - fileName + 1 );
32+ pathTail = ffStrCopyN (pathTail , fileName , length );
33+ mkdir (path , S_IRWXU | S_IRGRP | S_IROTH );
3334 fileName = token + 1 ;
3435 }
3536}
Original file line number Diff line number Diff line change 88
99static void createSubfolders (const char * fileName )
1010{
11- FF_STRBUF_AUTO_DESTROY path = ffStrbufCreate () ;
11+ char path [ MAX_PATH ] ;
1212 char * token = NULL ;
13+ char * pathTail = path ;
1314 while ((token = strchr (fileName , '/' )) != NULL )
1415 {
15- ffStrbufAppendNS (& path , (uint32_t )(token - fileName + 1 ), fileName );
16- CreateDirectoryA (path .chars , NULL );
16+ uint32_t length = (uint32_t )(token - fileName + 1 );
17+ pathTail = ffStrCopyN (pathTail , fileName , length );
18+ CreateDirectoryA (path , NULL );
1719 fileName = token + 1 ;
1820 }
1921}
You can’t perform that action at this time.
0 commit comments