commit 47c97e488f2f7430b114a911c6615f652d54b66d parent 18e9dd831f3efdc7c40432f1f5ab6b22cc45fb39 Author: cfillion <cfillion@users.noreply.github.com> Date: Tue, 4 Oct 2016 21:04:43 -0400 move the repo index cache to <respath>/ReaPack/cache/ subfolder this reduces the risk of deleting registry.db by mistake Diffstat:
28 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/filesystem.cpp b/src/filesystem.cpp @@ -94,7 +94,7 @@ bool FS::remove(const Path &path) // Then let's move it somewhere else. And delete it on next startup. // Windows is so great! - Path workaroundPath = Path::CACHE; + Path workaroundPath = Path::DATA; workaroundPath.append("old_" + path.last() + ".tmp"); return rename(path, workaroundPath); diff --git a/src/path.cpp b/src/path.cpp @@ -32,9 +32,10 @@ static const char SEPARATOR = '\\'; static const string DOT = "."; static const string DOTDOT = ".."; -Path Path::CACHE = Path("ReaPack"); +Path Path::DATA = Path("ReaPack"); +Path Path::CACHE = Path::DATA + "cache"; Path Path::CONFIG = Path("reapack.ini"); -Path Path::REGISTRY = Path::CACHE + "registry.db"; +Path Path::REGISTRY = Path::DATA + "registry.db"; Path Path::s_root; diff --git a/src/path.hpp b/src/path.hpp @@ -25,6 +25,7 @@ class UseRootPath; class Path { public: + static Path DATA; static Path CACHE; static Path CONFIG; static Path REGISTRY; diff --git a/test/indexes/ReaPack/broken.xml b/test/indexes/ReaPack/cache/broken.xml diff --git a/test/indexes/ReaPack/future_version.xml b/test/indexes/ReaPack/cache/future_version.xml diff --git a/test/indexes/ReaPack/invalid_version.xml b/test/indexes/ReaPack/cache/invalid_version.xml diff --git a/test/indexes/ReaPack/wrong_root.xml b/test/indexes/ReaPack/cache/wrong_root.xml diff --git a/test/indexes/ReaPack/Новая папка.xml b/test/indexes/ReaPack/cache/Новая папка.xml diff --git a/test/indexes/v1/ReaPack/author.xml b/test/indexes/v1/ReaPack/cache/author.xml diff --git a/test/indexes/v1/ReaPack/changelog.xml b/test/indexes/v1/ReaPack/cache/changelog.xml diff --git a/test/indexes/v1/ReaPack/metadata.xml b/test/indexes/v1/ReaPack/cache/metadata.xml diff --git a/test/indexes/v1/ReaPack/missing_platform.xml b/test/indexes/v1/ReaPack/cache/missing_platform.xml diff --git a/test/indexes/v1/ReaPack/missing_source_file.xml b/test/indexes/v1/ReaPack/cache/missing_source_file.xml diff --git a/test/indexes/v1/ReaPack/missing_source_url.xml b/test/indexes/v1/ReaPack/cache/missing_source_url.xml diff --git a/test/indexes/v1/ReaPack/missing_type.xml b/test/indexes/v1/ReaPack/cache/missing_type.xml diff --git a/test/indexes/v1/ReaPack/missing_version.xml b/test/indexes/v1/ReaPack/cache/missing_version.xml diff --git a/test/indexes/v1/ReaPack/pkg_desc.xml b/test/indexes/v1/ReaPack/cache/pkg_desc.xml diff --git a/test/indexes/v1/ReaPack/pkg_metadata.xml b/test/indexes/v1/ReaPack/cache/pkg_metadata.xml diff --git a/test/indexes/v1/ReaPack/src_platform.xml b/test/indexes/v1/ReaPack/cache/src_platform.xml diff --git a/test/indexes/v1/ReaPack/src_type.xml b/test/indexes/v1/ReaPack/cache/src_type.xml diff --git a/test/indexes/v1/ReaPack/time.xml b/test/indexes/v1/ReaPack/cache/time.xml diff --git a/test/indexes/v1/ReaPack/unnamed_category.xml b/test/indexes/v1/ReaPack/cache/unnamed_category.xml diff --git a/test/indexes/v1/ReaPack/unnamed_package.xml b/test/indexes/v1/ReaPack/cache/unnamed_package.xml diff --git a/test/indexes/v1/ReaPack/unsupported_type.xml b/test/indexes/v1/ReaPack/cache/unsupported_type.xml diff --git a/test/indexes/v1/ReaPack/valid_index.xml b/test/indexes/v1/ReaPack/cache/valid_index.xml diff --git a/test/indexes/v1/ReaPack/wrong_category_tag.xml b/test/indexes/v1/ReaPack/cache/wrong_category_tag.xml diff --git a/test/indexes/v1/ReaPack/wrong_package_tag.xml b/test/indexes/v1/ReaPack/cache/wrong_package_tag.xml diff --git a/test/indexes/v1/ReaPack/wrong_version_tag.xml b/test/indexes/v1/ReaPack/cache/wrong_version_tag.xml