diff options
Diffstat (limited to 'src/structs.rs')
| -rw-r--r-- | src/structs.rs | 9 | 
1 files changed, 8 insertions, 1 deletions
| 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 { | 
