Problem
Test connection on a remote target reports "Connection OK — SSH, remote path, and rsync all good" even when local_archive_root points at a directory that does not exist. The misconfiguration surfaces much later, on the Import page, as a message that blames the destination rather than the archive root.
Reproduction
-
Configure a remote target with a valid host/user/remote path.
-
Set Local archive root to a path that doesn't exist, or that differs from the real folder by a typo (in the case that prompted this: ~/Pictures/Vireo_Archive in config vs ~/Pictures/Vireo Archive on disk — underscore vs space, invisible because the field is too narrow to show the full path).
-
Click Test connection → green "Connection OK".
-
Go to Import, pick Copy to archive + a local destination + an after-import process.
-
The "Then move to NAS" row does not appear. The hint shown is:
Move to NAS unavailable: the destination is not inside any remote target's local archive root. Set one under Settings > Remote targets.
Why the message misleads
The hint (vireo/templates/import.html:1467-1469) is accurate in a literal sense but points at the wrong field. The destination may be perfectly reasonable; the archive root is the broken value. A user reading this will re-examine and re-type their destination, which can never fix it.
Root cause
_coerce_remote_target validates that local_archive_root is absolute and not inside mount_path (vireo/config.py:753-775), but never that it exists.
test_remote_connection's contract omits it entirely — from the docstring at vireo/app.py:22137:
SSH reachability, remote-path writability, GNU rsync availability, and whether the local mount path is currently present.
Note that mount_path is existence-checked (res["mount_present"] = bool(mount and os.path.isdir(mount)), vireo/app.py:22159) — so the asymmetry is already inconsistent within the same endpoint.
Suggested fix
- Add an
archive_root_present check to /api/remote-targets/test mirroring mount_present, and downgrade the result from a bare "Connection OK" when it's false — e.g. "Connection OK, but the local archive root does not exist — chained moves won't be offered."
- Optionally offer to create the directory inline, since the fix is a one-line
mkdir -p.
- Make the Import-side hint distinguish the two cases: "no target has an archive root configured" vs "the configured archive root (
<path>) does not exist" vs "your destination is outside it (<archive root>)". Showing the actual archive-root path in the message would have made this self-diagnosing.
Related: the field is too narrow to display a typical absolute path, which is what let the typo hide (see the folder-picker issue).
Problem
Test connectionon a remote target reports "Connection OK — SSH, remote path, and rsync all good" even whenlocal_archive_rootpoints at a directory that does not exist. The misconfiguration surfaces much later, on the Import page, as a message that blames the destination rather than the archive root.Reproduction
Configure a remote target with a valid host/user/remote path.
Set Local archive root to a path that doesn't exist, or that differs from the real folder by a typo (in the case that prompted this:
~/Pictures/Vireo_Archivein config vs~/Pictures/Vireo Archiveon disk — underscore vs space, invisible because the field is too narrow to show the full path).Click Test connection → green "Connection OK".
Go to Import, pick Copy to archive + a local destination + an after-import process.
The "Then move to NAS" row does not appear. The hint shown is:
Why the message misleads
The hint (
vireo/templates/import.html:1467-1469) is accurate in a literal sense but points at the wrong field. The destination may be perfectly reasonable; the archive root is the broken value. A user reading this will re-examine and re-type their destination, which can never fix it.Root cause
_coerce_remote_targetvalidates thatlocal_archive_rootis absolute and not insidemount_path(vireo/config.py:753-775), but never that it exists.test_remote_connection's contract omits it entirely — from the docstring atvireo/app.py:22137:Note that
mount_pathis existence-checked (res["mount_present"] = bool(mount and os.path.isdir(mount)),vireo/app.py:22159) — so the asymmetry is already inconsistent within the same endpoint.Suggested fix
archive_root_presentcheck to/api/remote-targets/testmirroringmount_present, and downgrade the result from a bare "Connection OK" when it's false — e.g. "Connection OK, but the local archive root does not exist — chained moves won't be offered."mkdir -p.<path>) does not exist" vs "your destination is outside it (<archive root>)". Showing the actual archive-root path in the message would have made this self-diagnosing.Related: the field is too narrow to display a typical absolute path, which is what let the typo hide (see the folder-picker issue).