@@ -205,7 +205,7 @@ int mingw_unlink(const char *pathname)
205
205
{
206
206
int ret , tries = 0 ;
207
207
wchar_t wpathname [MAX_PATH ];
208
- if (xutftowcs_canonical_path (wpathname , pathname ) < 0 )
208
+ if (xutftowcs_path (wpathname , pathname ) < 0 )
209
209
return -1 ;
210
210
211
211
/* read-only files cannot be removed */
@@ -256,7 +256,7 @@ int mingw_rmdir(const char *pathname)
256
256
{
257
257
int ret , tries = 0 ;
258
258
wchar_t wpathname [MAX_PATH ];
259
- if (xutftowcs_canonical_path (wpathname , pathname ) < 0 )
259
+ if (xutftowcs_path (wpathname , pathname ) < 0 )
260
260
return -1 ;
261
261
262
262
while ((ret = _wrmdir (wpathname )) == -1 && tries < ARRAY_SIZE (delay )) {
@@ -298,7 +298,7 @@ void mingw_mark_as_git_dir(const char *dir)
298
298
{
299
299
wchar_t wdir [MAX_PATH ];
300
300
if (hide_dotfiles != HIDE_DOTFILES_FALSE && !is_bare_repository ())
301
- if (xutftowcs_canonical_path (wdir , dir ) < 0 || make_hidden (wdir ))
301
+ if (xutftowcs_path (wdir , dir ) < 0 || make_hidden (wdir ))
302
302
warning ("Failed to make '%s' hidden" , dir );
303
303
git_config_set ("core.hideDotFiles" ,
304
304
hide_dotfiles == HIDE_DOTFILES_FALSE ? "false" :
@@ -310,7 +310,7 @@ int mingw_mkdir(const char *path, int mode)
310
310
{
311
311
int ret ;
312
312
wchar_t wpath [MAX_PATH ];
313
- if (xutftowcs_canonical_path (wpath , path ) < 0 )
313
+ if (xutftowcs_path (wpath , path ) < 0 )
314
314
return -1 ;
315
315
ret = _wmkdir (wpath );
316
316
if (!ret && hide_dotfiles == HIDE_DOTFILES_TRUE ) {
@@ -340,7 +340,7 @@ int mingw_open (const char *filename, int oflags, ...)
340
340
if (filename && !strcmp (filename , "/dev/null" ))
341
341
filename = "nul" ;
342
342
343
- if (xutftowcs_canonical_path (wfilename , filename ) < 0 )
343
+ if (xutftowcs_path (wfilename , filename ) < 0 )
344
344
return -1 ;
345
345
fd = _wopen (wfilename , oflags , mode );
346
346
@@ -416,7 +416,7 @@ FILE *mingw_fopen (const char *filename, const char *otype)
416
416
hide = access (filename , F_OK );
417
417
if (filename && !strcmp (filename , "/dev/null" ))
418
418
filename = "nul" ;
419
- if (xutftowcs_canonical_path (wfilename , filename ) < 0 ||
419
+ if (xutftowcs_path (wfilename , filename ) < 0 ||
420
420
xutftowcs (wotype , otype , ARRAY_SIZE (wotype )) < 0 )
421
421
return NULL ;
422
422
file = _wfopen (wfilename , wotype );
@@ -435,7 +435,7 @@ FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream)
435
435
hide = access (filename , F_OK );
436
436
if (filename && !strcmp (filename , "/dev/null" ))
437
437
filename = "nul" ;
438
- if (xutftowcs_canonical_path (wfilename , filename ) < 0 ||
438
+ if (xutftowcs_path (wfilename , filename ) < 0 ||
439
439
xutftowcs (wotype , otype , ARRAY_SIZE (wotype )) < 0 )
440
440
return NULL ;
441
441
file = _wfreopen (wfilename , wotype , stream );
@@ -469,7 +469,7 @@ int mingw_fflush(FILE *stream)
469
469
int mingw_access (const char * filename , int mode )
470
470
{
471
471
wchar_t wfilename [MAX_PATH ];
472
- if (xutftowcs_canonical_path (wfilename , filename ) < 0 )
472
+ if (xutftowcs_path (wfilename , filename ) < 0 )
473
473
return -1 ;
474
474
/* X_OK is not supported by the MSVCRT version */
475
475
return _waccess (wfilename , mode & ~X_OK );
@@ -478,15 +478,15 @@ int mingw_access(const char *filename, int mode)
478
478
int mingw_chdir (const char * dirname )
479
479
{
480
480
wchar_t wdirname [MAX_PATH ];
481
- if (xutftowcs_canonical_path (wdirname , dirname ) < 0 )
481
+ if (xutftowcs_path (wdirname , dirname ) < 0 )
482
482
return -1 ;
483
483
return _wchdir (wdirname );
484
484
}
485
485
486
486
int mingw_chmod (const char * filename , int mode )
487
487
{
488
488
wchar_t wfilename [MAX_PATH ];
489
- if (xutftowcs_canonical_path (wfilename , filename ) < 0 )
489
+ if (xutftowcs_path (wfilename , filename ) < 0 )
490
490
return -1 ;
491
491
return _wchmod (wfilename , mode );
492
492
}
@@ -502,7 +502,7 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)
502
502
{
503
503
WIN32_FILE_ATTRIBUTE_DATA fdata ;
504
504
wchar_t wfilename [MAX_PATH ];
505
- if (xutftowcs_canonical_path (wfilename , file_name ) < 0 )
505
+ if (xutftowcs_path (wfilename , file_name ) < 0 )
506
506
return -1 ;
507
507
508
508
if (GetFileAttributesExW (wfilename , GetFileExInfoStandard , & fdata )) {
@@ -646,7 +646,7 @@ int mingw_utime (const char *file_name, const struct utimbuf *times)
646
646
int fh , rc ;
647
647
DWORD attrs ;
648
648
wchar_t wfilename [MAX_PATH ];
649
- if (xutftowcs_canonical_path (wfilename , file_name ) < 0 )
649
+ if (xutftowcs_path (wfilename , file_name ) < 0 )
650
650
return -1 ;
651
651
652
652
/* must have write permission */
@@ -1629,8 +1629,7 @@ int mingw_rename(const char *pold, const char *pnew)
1629
1629
DWORD attrs , gle ;
1630
1630
int tries = 0 ;
1631
1631
wchar_t wpold [MAX_PATH ], wpnew [MAX_PATH ];
1632
- if (xutftowcs_canonical_path (wpold , pold ) < 0 ||
1633
- xutftowcs_canonical_path (wpnew , pnew ) < 0 )
1632
+ if (xutftowcs_path (wpold , pold ) < 0 || xutftowcs_path (wpnew , pnew ) < 0 )
1634
1633
return -1 ;
1635
1634
1636
1635
/*
@@ -1907,8 +1906,8 @@ int link(const char *oldpath, const char *newpath)
1907
1906
typedef BOOL (WINAPI * T )(LPCWSTR , LPCWSTR , LPSECURITY_ATTRIBUTES );
1908
1907
static T create_hard_link = NULL ;
1909
1908
wchar_t woldpath [MAX_PATH ], wnewpath [MAX_PATH ];
1910
- if (xutftowcs_canonical_path (woldpath , oldpath ) < 0 ||
1911
- xutftowcs_canonical_path (wnewpath , newpath ) < 0 )
1909
+ if (xutftowcs_path (woldpath , oldpath ) < 0 ||
1910
+ xutftowcs_path (wnewpath , newpath ) < 0 )
1912
1911
return -1 ;
1913
1912
1914
1913
if (!create_hard_link ) {
0 commit comments