Update README
This commit is contained in:
parent
7f2cb6e049
commit
2f88ac90cd
|
@ -77,7 +77,7 @@ public class Args{
|
|||
}
|
||||
```
|
||||
|
||||
Rust Version ( Currently only support Linux or macOS )
|
||||
Rust Version
|
||||
|
||||
```rust
|
||||
use std::env;
|
||||
|
@ -89,7 +89,12 @@ fn main() {
|
|||
|
||||
// Handle the path string
|
||||
let exec_len: usize = 13;
|
||||
let length: usize = execpath.len() - exec_len;
|
||||
let length: usize;
|
||||
if cfg!(target_os = "windows") {
|
||||
length = execpath.len() - exec_len - 4;
|
||||
} else {
|
||||
length = execpath.len() - exec_len;
|
||||
}
|
||||
let path: &str = &execpath[0..length];
|
||||
|
||||
// Print the path of executive
|
||||
|
|
Loading…
Reference in New Issue