From 62493fbc4073efb9801521af4eeff310987de025 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Tue, 4 Apr 2023 23:28:17 +0200 Subject: [PATCH] backup: Allow to treat whitespaces in paths in config file --- src/repofile/snapshotfile.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/repofile/snapshotfile.rs b/src/repofile/snapshotfile.rs index 0fbc701..edbd8a4 100644 --- a/src/repofile/snapshotfile.rs +++ b/src/repofile/snapshotfile.rs @@ -21,6 +21,7 @@ use serde_with::{serde_as, DisplayFromStr}; use super::Id; use crate::backend::{DecryptReadBackend, FileType, RepoFile}; +use crate::repository::parse_command; #[serde_as] #[derive(Clone, Default, Parser, Deserialize, Merge)] @@ -660,7 +661,8 @@ impl PathList { } pub fn from_string(sources: &str, sanitize: bool) -> Result { - Self::from_strings(sources.split_whitespace(), sanitize) + let sources = parse_command::<()>(sources)?.1; + Self::from_strings(sources, sanitize) } pub fn paths(&self) -> Vec {