diff options
Diffstat (limited to 'rust/libnewsboat-ffi/src/filepath.rs')
-rw-r--r-- | rust/libnewsboat-ffi/src/filepath.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/libnewsboat-ffi/src/filepath.rs b/rust/libnewsboat-ffi/src/filepath.rs index 778ed0de..65ed82b8 100644 --- a/rust/libnewsboat-ffi/src/filepath.rs +++ b/rust/libnewsboat-ffi/src/filepath.rs @@ -25,7 +25,7 @@ mod bridged { fn clone(filepath: &PathBuf) -> Box<PathBuf>; fn is_absolute(filepath: &PathBuf) -> bool; fn set_extension(filepath: &mut PathBuf, extension: Vec<u8>) -> bool; - fn starts_with(filepath: &PathBuf, str: Vec<u8>) -> bool; + fn starts_with(filepath: &PathBuf, base: &PathBuf) -> bool; fn file_name(filepath: &PathBuf) -> Vec<u8>; } } @@ -68,8 +68,8 @@ fn set_extension(filepath: &mut PathBuf, extension: Vec<u8>) -> bool { filepath.0.set_extension(OsStr::from_bytes(&extension)) } -fn starts_with(filepath: &PathBuf, base: Vec<u8>) -> bool { - filepath.0.starts_with(OsStr::from_bytes(&base)) +fn starts_with(filepath: &PathBuf, base: &PathBuf) -> bool { + filepath.0.starts_with(&base.0) } fn file_name(filepath: &PathBuf) -> Vec<u8> { |