aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs2
-rw-r--r--src/structs.rs9
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 96572cc..b55bff9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -31,7 +31,7 @@ use utils::*;
use clap::{App, Arg, SubCommand};
-const VERSION: &str = "0.5.6";
+const VERSION: &str = "0.5.7";
fn main() -> Result<()> {
create_directories().chain_err(|| "unable to create directories")?;
diff --git a/src/structs.rs b/src/structs.rs
index 97e6718..e585677 100644
--- a/src/structs.rs
+++ b/src/structs.rs
@@ -14,8 +14,15 @@ use rss::{Channel, Item};
use serde_json;
use yaml_rust::YamlLoader;
+#[cfg(target_os = "macos")]
+static ESCAPE_REGEX: &str = r"/";
+#[cfg(target_os = "linux")]
+static ESCAPE_REGEX: &str = r"/";
+#[cfg(target_os = "windows")]
+static ESCAPE_REGEX: &str = r#"[\\/:*?"<>|]"#;
+
lazy_static! {
- static ref FILENAME_ESCAPE: Regex = Regex::new(r#"[\\/:*?"<>|]"#).unwrap();
+ static ref FILENAME_ESCAPE: Regex = Regex::new(ESCAPE_REGEX).unwrap();
}
pub struct Config {