jwaitq on Discord (#feedback, 11-02): updated from v0.1.2630 to v0.1.2670
with the update button, and magpie showed the setup of long ago.
9f1734645 (v0.1.2648) added the folders the system keeps Downloads,
Desktop and Documents in (Windows' known folders, moved to D:\ or OneDrive;
the XDG ones on Linux, ~/下载) to sharedFolder. A data folder beside magpie
there was then judged as one in home\Downloads: passed over whenever the
installed folder (~/.config/magpie) holds magpie's files too. Every release
before took any data folder there, so a user who kept magpie portable in
such a folder had all their files in data\, and an installed folder from
long ago with a settings.json was enough to make the updated magpie read
that one instead. On Windows the updated exe, no longer portable and in a
download folder, then also installed itself to
%LOCALAPPDATA%\Programs\magpie (update.Settle) and opened that copy.
shared() now treats a moved folder (movedFolder, the system's folder that
isn't home's own) as before v0.1.2648 for a data folder holding magpie's
files: it is taken. One holding none of them (another app's, or emptied by
an archiver, tangle778's case) is still passed over. home's own Downloads,
Desktop, Documents, the home folder and /Applications are unchanged.
userFolder is a hook so the test runs on every system.
Users already hit: on Linux the next update finds data/ again by itself.
On Windows the copy in %LOCALAPPDATA%\Programs\magpie runs from a folder
with no data beside it, so it keeps reading %USERPROFILE%\.config\magpie;
their files are untouched in <moved Downloads>\data and are brought back by
hand (copy into .config\magpie, or a .portable file beside the old exe).
Anything set up in v0.1.2648..2670 went into .config\magpie.
Run at this head (b61121503 + this):
- mote (macOS): gofmt -l clean; go vet ./internal/appdir ./internal/update,
GOOS=windows and GOOS=linux the same; go test -count=1 ./internal/appdir
./internal/update ./internal/settings ok.
- wsl-run (Ubuntu 24.04): go test ./internal/appdir ok.
- win-run (Windows 11): ./internal/appdir and ./internal/update: all pass
but TestFoldersJoinedOnce (filed #4846) and TestPackagedByDpkg (#4603),
both red the same on an unchanged b61121503 tree run there.
Broken by hand: shared() judging a moved folder as home's (the v0.1.2648
rule): TestResolveMovedDownloadsKeepsData red ("installed has old files:
\"\", want the data folder"; Passed names it).
Not tried: a real Downloads redirected on Windows, or a real update from
v0.1.2630 on such a layout; jwaitq's OS isn't known yet, and on a Mac
nothing about where data lives changed in v0.1.2630..2670.