Remove some white space/tabs from gnc-filepath-utils.cpp

This commit is contained in:
Robert Fewell 2019-03-29 17:34:04 +00:00
parent 22a7a05d50
commit 89d2cde979

View File

@ -374,8 +374,8 @@ gnc_validate_directory (const bfs::path &dirname)
* we need to overrule it during build (when guile interferes) * we need to overrule it during build (when guile interferes)
* and testing. * and testing.
*/ */
bfs::path home_dir(g_get_home_dir(), cvt); bfs::path home_dir(g_get_home_dir(), cvt);
home_dir.imbue(bfs_locale); home_dir.imbue(bfs_locale);
auto homedir_exists = bfs::exists(home_dir); auto homedir_exists = bfs::exists(home_dir);
auto is_descendant = dir_is_descendant (dirname, home_dir); auto is_descendant = dir_is_descendant (dirname, home_dir);
if (!homedir_exists && is_descendant) if (!homedir_exists && is_descendant)
@ -447,10 +447,10 @@ copy_recursive(const bfs::path& src, const bfs::path& dest)
string cur_str = direntry->path().string(); string cur_str = direntry->path().string();
#endif #endif
auto cur_len = cur_str.size(); auto cur_len = cur_str.size();
string rel_str(cur_str, old_len, cur_len - old_len); string rel_str(cur_str, old_len, cur_len - old_len);
bfs::path relpath(rel_str, cvt); bfs::path relpath(rel_str, cvt);
auto newpath = bfs::absolute (relpath.relative_path(), dest); auto newpath = bfs::absolute (relpath.relative_path(), dest);
newpath.imbue(bfs_locale); newpath.imbue(bfs_locale);
bfs::copy(direntry->path(), newpath); bfs::copy(direntry->path(), newpath);
} }
} }
@ -526,7 +526,6 @@ get_userdata_home(void)
auto try_tmp_dir = true; auto try_tmp_dir = true;
auto userdata_home = get_user_data_dir(); auto userdata_home = get_user_data_dir();
/* g_get_user_data_dir doesn't check whether the path exists nor attempts to /* g_get_user_data_dir doesn't check whether the path exists nor attempts to
* create it. So while it may return an actual path we may not be able to use it. * create it. So while it may return an actual path we may not be able to use it.
* Let's check that now */ * Let's check that now */
@ -550,9 +549,9 @@ get_userdata_home(void)
Hopefully we can always write there. */ Hopefully we can always write there. */
if (try_tmp_dir) if (try_tmp_dir)
{ {
bfs::path newpath(g_get_tmp_dir (), cvt); bfs::path newpath(g_get_tmp_dir (), cvt);
userdata_home = newpath / g_get_user_name (); userdata_home = newpath / g_get_user_name ();
userdata_home.imbue(bfs_locale); userdata_home.imbue(bfs_locale);
} }
g_assert(!userdata_home.empty()); g_assert(!userdata_home.empty());