Skip to content

Commit

Permalink
Filesystem: remove unused code, rename global type
Browse files Browse the repository at this point in the history
  • Loading branch information
anonimal committed Oct 30, 2016
1 parent 2fdee6c commit 32d0454
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
17 changes: 4 additions & 13 deletions src/app/util/filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,7 @@
namespace kovri {
namespace app {

std::string app_name("kovri");

void SetAppName(
const std::string& name) {
app_name = name;
}

std::string GetAppName() {
return app_name;
}
std::string g_AppName("kovri");

boost::filesystem::path GetConfigFile() {
boost::filesystem::path kovri_conf(
Expand Down Expand Up @@ -124,7 +115,7 @@ boost::filesystem::path GetDefaultDataPath() {
// Windows
char local_app_data[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_APPDATA, 0, NULL, local_app_data);
return boost::filesystem::path(std::string(local_app_data) + "\\" + app_name);
return boost::filesystem::path(std::string(local_app_data) + "\\" + g_AppName);
#else
boost::filesystem::path path_ret;
char* home = getenv("HOME");
Expand All @@ -136,10 +127,10 @@ boost::filesystem::path GetDefaultDataPath() {
// Mac
path_ret /= "Library/Application Support";
create_directory(path_ret);
return path_ret / app_name;
return path_ret / g_AppName;
#else
// Unix
return path_ret / (std::string(".") + app_name);
return path_ret / (std::string(".") + g_AppName);
#endif
#endif
#endif
Expand Down
9 changes: 0 additions & 9 deletions src/app/util/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@
namespace kovri {
namespace app {

/**
* Change the application name.
*/
void SetAppName(
const std::string& name);

/// @return the application name.
std::string GetAppName();

/// @return the full path of a file within the kovri directory
std::string GetFullPath(
const std::string& filename);
Expand Down

0 comments on commit 32d0454

Please sign in to comment.