mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
Merge pull request #495 from rustic-rs/windows-repo-drive
Windows: Allow repo to start with drive letter
This commit is contained in:
commit
143167ca64
@ -7,6 +7,7 @@ Breaking changes:
|
||||
Bugs fixed:
|
||||
|
||||
New features:
|
||||
- Experimental windows support has been added.
|
||||
- New command dump has been added.
|
||||
- New command merge has been added.
|
||||
- Extra or wrong fields in the config file now lead to rustic complaining and aborting.
|
||||
|
||||
@ -16,6 +16,8 @@ use ChooseBackend::{Local, Rclone, Rest};
|
||||
impl ChooseBackend {
|
||||
pub fn from_url(url: &str) -> Result<Self> {
|
||||
Ok(match url.split_once(':') {
|
||||
#[cfg(windows)]
|
||||
Some((drive, _)) if drive.len() == 1 => Local(LocalBackend::new(url)?),
|
||||
Some(("rclone", path)) => Rclone(RcloneBackend::new(path)?),
|
||||
Some(("rest", path)) => Rest(RestBackend::new(path)?),
|
||||
Some(("local", path)) => Local(LocalBackend::new(path)?),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user