diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-18 23:28:54 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-18 23:28:54 +0530 |
commit | 7b3d670e230bb035ec74c73b6ac75b067be1f5e5 (patch) | |
tree | 14565e16218cdd365daec0b76fbbcc21651e5902 /path.cpp | |
parent | c9f4e91df88112ea4ff5f5d9a993c3655672ce93 (diff) |
Removing some unnecessary calls to c_str(), and added str2wcstring(std::string) in common.cpp.
Diffstat (limited to 'path.cpp')
-rw-r--r-- | path.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -303,7 +303,7 @@ bool path_get_cdpath_string(const wcstring &dir_str, wcstring &result, const env append_path_component(whole_path, dir); struct stat buf; - if( wstat( whole_path.c_str(), &buf ) == 0 ) + if( wstat( whole_path, &buf ) == 0 ) { if( S_ISDIR(buf.st_mode) ) { @@ -318,7 +318,7 @@ bool path_get_cdpath_string(const wcstring &dir_str, wcstring &result, const env } else { - if( lwstat( whole_path.c_str(), &buf ) == 0 ) + if( lwstat( whole_path, &buf ) == 0 ) { err = EROTTEN; } @@ -451,7 +451,7 @@ bool path_get_config(wcstring &path) if( ! xdg_dir.missing() ) { res = xdg_dir + L"/fish"; - if( !create_directory( res.c_str() ) ) + if( !create_directory( res ) ) { done = 1; } @@ -462,7 +462,7 @@ bool path_get_config(wcstring &path) if( ! home.missing() ) { res = home + L"/.config/fish"; - if( !create_directory( res.c_str() ) ) + if( !create_directory( res ) ) { done = 1; } |