From de139af60834cf07e265993672c784a0ec0ccff2 Mon Sep 17 00:00:00 2001 From: wiam <230908809+wiam77@users.noreply.github.com> Date: Wed, 22 Oct 2025 14:52:21 -0300 Subject: [PATCH] Fix for android I tried building a crate that depends on this library on Termux, a terminal emulator that emulates a Linux environment within Android, and got hit with an error, as the `path` function wasn't implemented for the OS. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1cd2fe1..557be1f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,7 @@ pub trait FilePath { } impl FilePath for File { - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "android"))] fn path(&self) -> io::Result { use std::path::Path;