diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-09 18:43:36 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-09 18:43:36 -0800 |
commit | e5ff5f7484c0e751172a2cab65d6d88a68ef281d (patch) | |
tree | ab384fbf6216fa62a602fab569a6ffc47d629fa6 /path.cpp | |
parent | 646240fc54617d39e0768d256a15eda94ee52812 (diff) |
Some hopefully good changes to get IOs off of halloc
Diffstat (limited to 'path.cpp')
-rw-r--r-- | path.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
@@ -443,46 +443,6 @@ bool path_can_get_cdpath(const wcstring &in) { return result; } -wchar_t *path_get_config( void *context) -{ - int done = 0; - wcstring res; - - const env_var_t xdg_dir = env_get_string( L"XDG_CONFIG_HOME" ); - if( ! xdg_dir.missing() ) - { - res = xdg_dir + L"/fish"; - if( !create_directory( res.c_str() ) ) - { - done = 1; - } - } - else - { - const env_var_t home = env_get_string( L"HOME" ); - if( ! home.missing() ) - { - res = home + L"/.config/fish"; - if( !create_directory( res.c_str() ) ) - { - done = 1; - } - } - } - - if( done ) - { - wchar_t *result = wcsdup(res.c_str()); - halloc_register_function( context, &free, result ); - return result; - } - else - { - debug( 0, _(L"Unable to create a configuration directory for fish. Your personal settings will not be saved. Please set the $XDG_CONFIG_HOME variable to a directory where the current user has write access." )); - return 0; - } -} - bool path_get_config(wcstring &path) { |