plugin.IsPath read a spec as a path when filepath.IsAbs said so on the
host. On Windows "/Users/me/plugin" is not absolute, so a folder plugin
added on a Mac was carried into a backup and a WebDAV sync as if it were
an npm package, and the Windows machine restoring it asked bun to install
"/Users/me/plugin". A spec starting with / or \ (a UNC path among them)
now counts as a path on every system, as a drive-rooted one already did
off Windows.
Run:
- TestIsPathWhicheverSystemWroteIt (new). On the Windows box at the old
code it fails for "/Users/me/plugin", "/home/me/plugin/index.js" and
`\Users\me\plugin`; on macOS for the two backslash forms. Passes on both
with the change.
- On the Windows box, the three reds the issue names, old code then new:
TestPluginsCarried (provider), TestRestorePluginsAndSignIn (backup),
TestSyncPluginsAndSignIn (davsync) FAIL then PASS.
- go test -tags nogui ./... on macOS with this and the next four commits:
every package ok.
- gofmt -l, go vet ./... on darwin, linux (nogui) and windows, and the
three builds: clean.
- Windows internal/plugin as a whole: TestTaggedRepos, TestTaggedReposSlowRead,
TestReadmeOfTaggedRepo, TestGitPluginUpdateOnlyWhenItsRepositoryMoved,
TestMarketIconsAreBundled, TestEnsurePi and TestGitPlugin fail there
with and without the change (Windows-only, CI compiles them only).
TestLoadConcurrentWithSavesAndEdits failed once in the full package run
with the change; alone it passed 6 of 6 at the old code and 6 of 6 with
it. Noted on #1827, the open issue for Windows-only reds.