R3.1: real paths without \?\ on Windows (dunce); old recent lists read plain
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1066b41cb0
commit
d0b5aede95
21 files changed
+59
-24
No files matched your search
@@ -74,7 +74,7 @@ impl Lok {
|
||||
|
||||
/// dlopens the LOK library and hooks with the profile URL.
|
||||
pub fn hook(install: &Path, profile_url: &str) -> io::Result<Self> {
|
||||
let install = std::fs::canonicalize(install)?;
|
||||
let install = dunce::canonicalize(install)?;
|
||||
let install = install.as_path();
|
||||
let install_str = install.to_string_lossy().into_owned();
|
||||
let install_c = cstring(&install_str)?;
|
||||
|
||||
@@ -53,7 +53,7 @@ impl Worker {
|
||||
pub(crate) fn tile_self_check(&mut self, profile_dir: &Path) -> io::Result<bool> {
|
||||
let doc = profile_dir.join("lok-verify.fodt");
|
||||
std::fs::write(&doc, VERIFY_DOC)?;
|
||||
let url = ipc::file_url_of(&doc.canonicalize()?);
|
||||
let url = ipc::file_url_of(&dunce::canonicalize(&doc)?);
|
||||
let payload = self.request(tag::VERIFY, &Pack::new().str(&url).bytes())?;
|
||||
let red = Unpack::new(&payload).u64()?;
|
||||
Ok(red > 0)
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn run(
|
||||
output: impl Write + Send + 'static,
|
||||
) -> io::Result<()> {
|
||||
set_output(Box::new(output));
|
||||
let profile_dir = std::fs::canonicalize(profile_dir)?;
|
||||
let profile_dir = dunce::canonicalize(profile_dir)?;
|
||||
let profile_url = profile_url_of(&profile_dir);
|
||||
let _ = teardown::PROFILE.set(profile_dir.clone());
|
||||
let lok = Lok::hook(Path::new(install), &profile_url)?;
|
||||
|
||||
Reference in new issue
Block a user