sxyazi/yazi · error · io::Error

invalid trash mount point

Error message

invalid trash mount point

What it means

Error "invalid trash mount point" thrown in sxyazi/yazi.

Solutions

  1. The mount point for the trash directory could not be determined; check that the filesystem is mounted and readable.

When it happens

Trigger: Thrown at yazi-fs/src/trash/freedesktop/trash_info.rs:88 when the library encounters an invalid state.

Common situations: Determining the mount point for a trash location that lies outside any mounted filesystem.


AI-assisted analysis of sxyazi/yazi@a541adde4e (2026-08-19). Data as JSON: /api/errors/09d90e186f239ee5. Report an issue: GitHub.

Appendix: source

Thrown at yazi-fs/src/trash/freedesktop/trash_info.rs:86

			} else {
				Self::mount_point(root)?.join(path)
			});
		}
	}

	// /mnt/disk/.Trash/1000           =>  /mnt/disk
	// /home/alice/.local/share/Trash  =>  /home/alice/.local/share
	fn mount_point(root: &Path) -> io::Result<&Path> {
		let uid = Uzers::uid().to_string();

		if root.file_name() == Some(OsStr::new(&uid))
			&& let Some(parent) = root.parent()
			&& parent.file_name() == Some(OsStr::new(".Trash"))
		{
			parent.parent()
		} else {
			root.parent()
		}
		.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "invalid trash mount point"))
	}

	fn trim_line(line: &mut Vec<u8>) {
		while matches!(line.last(), Some(b'\n' | b'\r')) {
			line.pop();
		}
	}
}

View on GitHub (pinned to a541adde4e)