Closed MatejKafka closed 1 month ago
I just double-checked.
RSS Guard does use "cachePath" and "persistentStoragePath" already.
Double-tested with latest RSS Guard -> no "RSS Guard" folder is created in "Roaming" folder, all relevant cache/web folders are created under "data4" folder as expected. Cannot reproduce your problem, sorry.
I can reproduce the issue in a clean Windows Sandbox instance on Windows 10 22H2 by running the following PowerShell script:
curl.exe -L https://github.com/martinrotter/rssguard/releases/download/4.7.3/rssguard-4.7.3-a4e20486b-win10.7z --output rssguard.7z
curl.exe https://www.7-zip.org/a/7zr.exe --output 7zr.exe
.\7zr.exe x .\rssguard.7z -orssguard
.\rssguard\rssguard.exe
sleep 3
ls -Recurse "$env:APPDATA\RSS Guard\" # this prints some subdirectories, which should not be created
Wait, provide log (--log option) file from that workflow.
I spent some time spelunking in the Qt sources; apparently, constructing QWebEngineProfile
results in creating ProfileQt
, which internally calls ProfileAdapter::ensureDataPathExists
, which creates the directory in AppData
before you can set the correct data path.
I can reproduce the issue with the following code:
#include <QApplication>
#include <QWebEngineView>
#include <QWebEngineProfile>
int main(int argc, char* argv[]) {
QCoreApplication::setApplicationName("MyApp");
auto app = QApplication{argc, argv};
auto view = QWebEngineView{};
auto profile = QWebEngineProfile{"MyProfile"};
profile.setPersistentStoragePath(R"(custom_path\data)");
}
I'll open an issue in https://github.com/qt/qtwebengine, maybe someone will know about a workaround.
Brief description of the feature request
On Windows, RSS Guard offers a portable mode, which stores data in
data4
in the app directory. However, Qt still creates some data and cache directories inAppData
– most of them can be disabled or redirected externally using environment variables (QT_DISABLE_SHADER_DISK_CACHE, QT3D_WRITABLE_CACHE_PATH, QML_DISK_CACHE_PATH), except for browser data fromQWebEngine
, which is stored inAppData/Roaming/RSS Guard/QtWebEngine
.According to the docs, you should be able to override the paths used by
QtWebEngine
by using https://doc.qt.io/qt-6/qwebengineprofile.html#setCachePath and https://doc.qt.io/qt-6/qwebengineprofile.html#setPersistentStoragePath. Could you please move these directories to the portable data directory (data4
by default)? This would make RSS Guard a fully portable app, in the sense that no data is stored outside the configured data directory.