Closed enomothem closed 9 months ago
我知道是什么原因了,还是因为windows的文件系统不能存在特殊字符,我建议使用正则替换全部的特殊字符。我将提供到PR。 如果赞同我的方案,可以使用我的方案,也可以参考我的建议修改,处理这种情况。
let re = Regex::new(r"[<>?.~!@#$%^&*\\/|;:']").unwrap();
let regurl = re.replace_all(&url, "").to_string();
println!("{}", regurl);
let filename = format!(
"{}.png",
regurl.replace("://", "-").replace('/', "_").replace(':', "-")
);
Fyi, while committing you can actually close the issue like this
git commit -am "commit msg ; [ closes issue no: ]"
Anyways i'm closing this issue as well
@pwnwriter Get it
Description
File path error using special url path
Software Version
0.1.9
Steps to Reproduce
Windows 11
.\hxn.exe -b E:\\T0_APP\\Google\\Chrome\\Application\\chrome.exe -u http://xxx.com?new=1.1 --verbose
error: 文件名、目录名或卷标语法不正确。 (os error 123) error: The file name, directory name, or tagline method is incorrect (os error 123)Expected Behavior
url is recognized
Actual Behavior
error
Additional Information
No response