mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 19:15:40 +08:00
Add wrename wrapper around rename function
darcs-hash:20061020223347-ac50b-1735f7e63b87f021ca71c44e5278726d3e8debc3.gz
This commit is contained in:
parent
c0a54955e7
commit
8285242ff6
12
wutil.c
12
wutil.c
|
@ -549,3 +549,15 @@ int wmkdir( const wchar_t *name, int mode )
|
|||
char *name_narrow =wutil_wcs2str(name);
|
||||
return mkdir( name_narrow, mode );
|
||||
}
|
||||
|
||||
int wrename( const wchar_t *old, const wchar_t *new )
|
||||
{
|
||||
char *old_narrow =wutil_wcs2str(old);
|
||||
char *new_narrow =wcs2str(new);
|
||||
int res;
|
||||
|
||||
res = rename( old_narrow, new_narrow );
|
||||
free( new_narrow );
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user