Compare commits

..

2 Commits

Author SHA1 Message Date
Administrator
4c88c0a756 release: v3.3.20 2026-05-23 01:10:40 +02:00
Administrator
2208632154 ux(log): default fileuploader.log path is now the user's Desktop
In packaged builds path.dirname(process.execPath) resolves to
%LOCALAPPDATA%\Programs\Multi-Hoster-Upload — a hidden install
directory the user never visits and that NSIS may prune on
uninstall. Existing files written there were effectively invisible.

Change the unconfigured-default to app.getPath('desktop') instead.
If Desktop isn't available (rare), fall back to userData (Roaming),
and finally to the exe dir as a last resort. Dev mode (isPackaged
false) is unchanged — keeps the project dir for inspection.

Custom log paths set via the Settings UI override this and continue
to work as before. Existing users with old logs in the install dir
will just see a new fileuploader.log on the Desktop going forward;
the old file stays where it is (not auto-migrated).

137/137 tests still green.
2026-05-23 01:10:10 +02:00
2 changed files with 17 additions and 5 deletions

20
main.js
View File

@ -212,10 +212,22 @@ function normalizeApiError(payload, fallback) {
}
function getDefaultLogFilePath() {
const baseDir = app.isPackaged
? path.dirname(process.execPath)
: path.join(__dirname);
return path.join(baseDir, 'fileuploader.log');
// In packaged builds the exe dir is %LOCALAPPDATA%\Programs\Multi-Hoster-Upload
// — a hidden, install-managed location that NSIS may even prune on
// uninstall. Default to the user's Desktop so the file is actually
// findable; fall back to userData if Desktop isn't available, and
// finally to the project dir in dev mode.
if (app.isPackaged) {
try {
const desktop = app.getPath('desktop');
if (desktop) return path.join(desktop, 'fileuploader.log');
} catch {}
try {
return path.join(app.getPath('userData'), 'fileuploader.log');
} catch {}
return path.join(path.dirname(process.execPath), 'fileuploader.log');
}
return path.join(__dirname, 'fileuploader.log');
}
function getBaseLogFilePath() {

View File

@ -1,6 +1,6 @@
{
"name": "multi-hoster-uploader",
"version": "3.3.19",
"version": "3.3.20",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js",
"scripts": {