fix error when filename is errorous

update library
This commit is contained in:
none
2023-05-08 10:59:42 +02:00
parent 7f680ff4a1
commit 54ca3760f7
2 changed files with 3 additions and 2 deletions
+1 -1
Submodule library updated: 3326ee886b...02d6683cd8
+2 -1
View File
@@ -49,7 +49,7 @@ fn get_entries() -> Vec<String> {
for entry in ip_lib::get_entries() {
let entry_filename = entry.unwrap().file_name();
let ent = entry_filename.to_str().unwrap();
if ent != "token.ipasst" {
if ent != "token.ipasst" && ent.len()>6 {
vector.insert(0, ent[..ent.len()-6].to_string());
}
}
@@ -74,6 +74,7 @@ fn remove_entry(name: &str) -> bool {
fn open_authorize() -> u32 {
let code:u32 = rand::random();
open::that(format!("https://ipost.rocks/authorize?id=1&extra={}",code)).unwrap();
//the IPass app id is 1
code
}