fix(example): don't use relative path - not allowed
All checks were successful
Rust / build (map[name:nightly]) (push) Successful in 5m19s
Rust / build (map[name:stable]) (push) Successful in 5m33s
Release Please / Release-plz (push) Successful in 52s

This commit is contained in:
Paul Campbell 2024-11-22 19:21:51 +00:00
parent cfae6623de
commit 25fd976ed5

View file

@ -20,7 +20,8 @@ async fn main() -> kxio::Result<()> {
// Create a `FileSystem` object for accessing files within the current directory. // 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\ // The object created will return a `PathTraveral` error result if there is an attempt to\
// access a file outside of this directory. // 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. // The URL we will fetch - the readme for this library.
let url = "https://git.kemitix.net/kemitix/kxio/raw/branch/main/README.md"; let url = "https://git.kemitix.net/kemitix/kxio/raw/branch/main/README.md";