diff --git a/examples/get.rs b/examples/get.rs index 4a6ed57..2e39427 100644 --- a/examples/get.rs +++ b/examples/get.rs @@ -20,7 +20,8 @@ async fn main() -> kxio::Result<()> { // Create a `FileSystem` object for accessing files within the current directory. // The object created will return a `PathTraveral` error result if there is an attempt to\ // access a file outside of this directory. - let fs: kxio::fs::FileSystem = kxio::fs::new("./"); + let current_dir = std::env::current_dir().map_err(kxio::fs::Error::Io)?; + let fs: kxio::fs::FileSystem = kxio::fs::new(current_dir); // The URL we will fetch - the readme for this library. let url = "https://git.kemitix.net/kemitix/kxio/raw/branch/main/README.md";