mirror of
https://github.com/denisidoro/navi
synced 2024-11-10 14:04:17 +00:00
Use \ for paths in Windows (#499)
This commit is contained in:
parent
eb146fb3f7
commit
f352bcd1fa
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ use anyhow::Context;
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
use std::path;
|
||||||
|
|
||||||
pub fn browse(finder: &FinderChoice) -> Result<(), Error> {
|
pub fn browse(finder: &FinderChoice) -> Result<(), Error> {
|
||||||
let repo_pathbuf = {
|
let repo_pathbuf = {
|
||||||
|
@ -128,8 +129,8 @@ pub fn add(uri: String, finder: &FinderChoice) -> Result<(), Error> {
|
||||||
p
|
p
|
||||||
};
|
};
|
||||||
let filename = file
|
let filename = file
|
||||||
.replace(&format!("{}/", &tmp_path_str), "")
|
.replace(&format!("{}{}", &tmp_path_str, path::MAIN_SEPARATOR), "")
|
||||||
.replace("/", "__");
|
.replace(path::MAIN_SEPARATOR, "__");
|
||||||
let to = {
|
let to = {
|
||||||
let mut p = to_folder.clone();
|
let mut p = to_folder.clone();
|
||||||
p.push(filename);
|
p.push(filename);
|
||||||
|
|
Loading…
Reference in a new issue