fix: clear fragment before saving remote

This commit is contained in:
uncenter 2024-07-27 10:34:15 -04:00
parent da6976302a
commit 97e622a03d
No known key found for this signature in database

View file

@ -16,12 +16,13 @@ pub(crate) struct Package {
impl Package {
pub(super) fn new(url: &str, commit: Option<&str>) -> Self {
match Url::parse(url) {
Ok(url) => {
Ok(mut url) => {
let repo = url.path().trim_start_matches('/').to_string();
let child = match url.fragment() {
Some(fragment) => format!("{fragment}.yazi"),
None => String::new(),
};
url.set_fragment(None);
let remote = url.to_string();
return Self {