diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-05-26 14:50:58 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-05-26 14:51:05 +0200 |
commit | 9f95dcdb78b7675a5ef97eb0d354f4be86f9d6be (patch) | |
tree | 2c51d392b93c8ee23789cad89697c8de077d4617 /src/plugins | |
parent | 481ea1234a7d53061350af46e8fffd86fde46dc6 (diff) |
Fix room avatar getting corrupt after returning from watching media
Also dont save file manager path to disk. Save it to ram only
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/FileManager.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp index 2207c65..42c2f9e 100644 --- a/src/plugins/FileManager.cpp +++ b/src/plugins/FileManager.cpp @@ -8,9 +8,9 @@ namespace QuickMedia { static std::filesystem::path last_accessed_dir; static Path last_accessed_dir_path; static void set_last_accessed_dir(const std::filesystem::path &path) { - if(last_accessed_dir_path.data.empty()) - last_accessed_dir_path = get_storage_dir().join("file-manager").join("last_accessed_dir"); - file_overwrite_atomic(last_accessed_dir_path, path.string()); + //if(last_accessed_dir_path.data.empty()) + // last_accessed_dir_path = get_storage_dir().join("file-manager").join("last_accessed_dir"); + //file_overwrite_atomic(last_accessed_dir_path, path.string()); last_accessed_dir = path; } @@ -157,12 +157,12 @@ namespace QuickMedia { // static std::filesystem::path& FileManagerPage::get_last_accessed_directory(std::filesystem::path &fallback) { - if(!last_accessed_dir_loaded) { - last_accessed_dir_loaded = true; - std::string last_accessed_dir_str; - file_get_content(get_storage_dir().join("file-manager").join("last_accessed_dir"), last_accessed_dir_str); - last_accessed_dir = std::move(last_accessed_dir_str); - } + //if(!last_accessed_dir_loaded) { + // last_accessed_dir_loaded = true; + // std::string last_accessed_dir_str; + // file_get_content(get_storage_dir().join("file-manager").join("last_accessed_dir"), last_accessed_dir_str); + // last_accessed_dir = std::move(last_accessed_dir_str); + //} if(last_accessed_dir.empty()) return fallback; |