aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-18 23:28:54 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-18 23:28:54 +0530
commit7b3d670e230bb035ec74c73b6ac75b067be1f5e5 (patch)
tree14565e16218cdd365daec0b76fbbcc21651e5902 /path.cpp
parentc9f4e91df88112ea4ff5f5d9a993c3655672ce93 (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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/path.cpp b/path.cpp
index b866d6ef..8a05adf1 100644
--- a/path.cpp
+++ b/path.cpp
@@ -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;
}