Skip to content

Commit

Permalink
Update c file utils to treat special \\?\ chars
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Nov 24, 2024
1 parent 7c7376f commit 94cf865
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ncrystal_core/src/NCCFileUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ namespace {
mcwinstr fp = mc_winstr_expand_to_fullpath( wpath );
mcu8str res = mc_winstr_to_u8str( &fp );
mc_winstr_dealloc(&fp);
if ( mctools_impl_has_winnamespace( &res ) ) {
mcu8str res2 = mctools_impl_view_no_winnamespace( &res );
mcu8str_ensure_dynamic_buffer(&res2);
mcu8str_swap( &res, &res2 );
mcu8str_dealloc(&res);
}
return res;
}

Expand Down Expand Up @@ -1480,10 +1486,8 @@ namespace {
#ifdef MC_IS_WINDOWS
{
mcwinstr wpath = mc_path2wpath( &path );
mcwinstr wfp = mc_winstr_expand_to_fullpath( &wpath );
res = mc_winstr_expand_to_fullpath_u8str( &wpath );
mc_winstr_dealloc(&wpath);
res = mc_winstr_to_u8str( &wfp );
mc_winstr_dealloc(&wfp);
}
const int not_done = (res.size == 0?1:0);
#else
Expand Down

0 comments on commit 94cf865

Please sign in to comment.