summaryrefslogtreecommitdiffstats
path: root/src/common/profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/profile.cpp')
-rw-r--r--src/common/profile.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/common/profile.cpp b/src/common/profile.cpp
index 92fc1d6..75ab135 100644
--- a/src/common/profile.cpp
+++ b/src/common/profile.cpp
@@ -247,52 +247,3 @@ std::vector< std::string > CProfile::GetSection(std::string section, std::string
return ret_list;
}
-
-void CProfile::SetUserDir(std::string dir)
-{
- m_userDirectory = dir;
-}
-
-
-std::string CProfile::GetUserBasedPath(std::string dir, std::string defaultDir)
-{
- std::string path = dir;
- boost::replace_all(path, "\\", "/");
- if (dir.find("/") == std::string::npos)
- {
- path = defaultDir + "/" + dir;
- }
-
- if (m_userDirectory.length() > 0)
- {
- boost::replace_all(path, "%user%", m_userDirectory);
- }
- else
- {
- boost::replace_all(path, "%user%", defaultDir);
- }
-
- return fs::path(path).make_preferred().string();
-}
-
-
-bool CProfile::CopyFileToTemp(std::string filename)
-{
- std::string src, dst;
- std::string tmp_user_dir = m_userDirectory;
-
- src = GetUserBasedPath(filename, "textures");
- SetUserDir("temp");
- dst = GetUserBasedPath(filename, "textures");
- SetUserDir(tmp_user_dir);
-
- fs::create_directory(fs::path(dst).parent_path().make_preferred().string());
- fs::copy_file(src, dst, fs::copy_option::overwrite_if_exists);
- if (fs::exists(dst))
- {
- return true;
- }
-
- return false;
-}
-