fix(example): don't use relative path - not allowed
This commit is contained in:
parent
cfae6623de
commit
25fd976ed5
1 changed files with 2 additions and 1 deletions
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue