mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: clear fragment before saving remote
This commit is contained in:
parent
da6976302a
commit
97e622a03d
1 changed files with 2 additions and 1 deletions
|
|
@ -16,12 +16,13 @@ pub(crate) struct Package {
|
||||||
impl Package {
|
impl Package {
|
||||||
pub(super) fn new(url: &str, commit: Option<&str>) -> Self {
|
pub(super) fn new(url: &str, commit: Option<&str>) -> Self {
|
||||||
match Url::parse(url) {
|
match Url::parse(url) {
|
||||||
Ok(url) => {
|
Ok(mut url) => {
|
||||||
let repo = url.path().trim_start_matches('/').to_string();
|
let repo = url.path().trim_start_matches('/').to_string();
|
||||||
let child = match url.fragment() {
|
let child = match url.fragment() {
|
||||||
Some(fragment) => format!("{fragment}.yazi"),
|
Some(fragment) => format!("{fragment}.yazi"),
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
};
|
};
|
||||||
|
url.set_fragment(None);
|
||||||
let remote = url.to_string();
|
let remote = url.to_string();
|
||||||
|
|
||||||
return Self {
|
return Self {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue