mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-30 07:01:22 -03:00
Switch file_io_t to store a wcstring
We no longer use file_io_t after fork(). We don't need to use a malloc'd string any more. Use a wcstring.
This commit is contained in:
@@ -210,6 +210,11 @@ int open_cloexec(const std::string &cstring, int flags, mode_t mode, bool cloexe
|
||||
return fd;
|
||||
}
|
||||
|
||||
int wopen(const wcstring &pathname, int flags, mode_t mode) {
|
||||
cstring tmp = wcs2string(pathname);
|
||||
return open(tmp.c_str(), flags, mode);
|
||||
}
|
||||
|
||||
int wopen_cloexec(const wcstring &pathname, int flags, mode_t mode) {
|
||||
cstring tmp = wcs2string(pathname);
|
||||
return open_cloexec(tmp, flags, mode, true);
|
||||
|
||||
Reference in New Issue
Block a user