Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
fix file path
Browse files Browse the repository at this point in the history
  • Loading branch information
super1207 committed Oct 31, 2023
1 parent 62e7339 commit 2e67129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kook_onebot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,10 @@ impl KookOnebot {
base64::engine::general_purpose::PAD), b64_str)?;
}else {
let file_path;
if cfg!(target_os = "linux") {
file_path = uri.get(7..).ok_or("can't get file_path")?;
} else {
if cfg!(target_os = "windows") {
file_path = uri.get(8..).ok_or("can't get file_path")?;
} else {
file_path = uri.get(7..).ok_or("can't get file_path")?;
}
let path = Path::new(&file_path);
file_bin = tokio::fs::read(path).await?;
Expand Down

0 comments on commit 2e67129

Please sign in to comment.