mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 03:01:15 -03:00
Modified most functions in wutil.h/.cpp to use wcstring instead of wchar_t*, removing calls to c_str() while calling these functions in other files.
This commit is contained in:
@@ -20,11 +20,11 @@ static const int kAutoloadStalenessInterval = 15;
|
||||
file_access_attempt_t access_file(const wcstring &path, int mode) {
|
||||
file_access_attempt_t result = {0};
|
||||
struct stat statbuf;
|
||||
if (wstat(path.c_str(), &statbuf)) {
|
||||
if (wstat(path, &statbuf)) {
|
||||
result.error = errno;
|
||||
} else {
|
||||
result.mod_time = statbuf.st_mtime;
|
||||
if (waccess(path.c_str(), mode)) {
|
||||
if (waccess(path, mode)) {
|
||||
result.error = errno;
|
||||
} else {
|
||||
result.accessible = true;
|
||||
|
||||
Reference in New Issue
Block a user