fix(token): allow to get and store token in local config

This commit is contained in:
grimhilt
2024-02-21 16:50:54 +01:00
parent a5c5f4a713
commit 69614b0c9f
4 changed files with 32 additions and 16 deletions

View File

@@ -39,6 +39,8 @@ pub fn get_relative_s(p: String, api_props: &ApiProps) -> String {
final_p = final_p.strip_prefix("/remote.php/dav/files/").unwrap().to_string();
final_p = final_p.strip_prefix(&api_props.username).unwrap().to_string();
final_p = final_p.strip_prefix(&api_props.root).unwrap().to_string();
final_p = final_p.strip_prefix("/").unwrap().to_string();
if final_p.starts_with("/") {
final_p = final_p.strip_prefix("/").unwrap().to_string();
}
final_p
}