use path sep
This commit is contained in:
parent
55f1229989
commit
8d1d3e514b
1 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ use hex;
|
|||
use sha2::{Sha256, Digest};
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::{Path, PathBuf, MAIN_SEPARATOR_STR};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::thread;
|
||||
|
@ -248,7 +248,7 @@ impl Refractr {
|
|||
let work_dir = self.set_up_work_dir(match &cfg.config.work_dir {
|
||||
None => {
|
||||
if cfg!(windows) {
|
||||
PathBuf::from(format!("\"{}\\refractr\"", env::var("TEMP").unwrap()))
|
||||
PathBuf::from(format!("{}\\refractr\"", env::var("TEMP").unwrap()))
|
||||
} else {
|
||||
PathBuf::from("/tmp/refractr")
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ impl Refractr {
|
|||
fo.remote_callbacks(cb);
|
||||
builder.fetch_options(fo);
|
||||
|
||||
let repo_dir = format!("{}/{}", &path_str, repo_name);
|
||||
let repo_dir = format!("{}{}{}", &path_str, MAIN_SEPARATOR_STR, repo_name);
|
||||
let repo = match builder.clone(&cfg.config.from, Path::new(&repo_dir)) {
|
||||
Ok(repo) => repo,
|
||||
Err(_) => {
|
||||
|
@ -319,7 +319,7 @@ impl Refractr {
|
|||
}
|
||||
};
|
||||
|
||||
self.set_up_refs(&repo, &cfg.config.branches);
|
||||
self.set_up_refs(&repo, &cfg.config.branches).unwrap();
|
||||
self.fetch(&repo, &cfg.config.branches, Some(&cfg.config.git.ssh_identity_file)).unwrap();
|
||||
|
||||
let remotes = match self.make_remotes(&repo, &cfg) {
|
||||
|
|
Loading…
Add table
Reference in a new issue