We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d62bf63 commit 7ae60a1Copy full SHA for 7ae60a1
src/files.rs
@@ -27,13 +27,17 @@ use crate::mutable::file::File as MutFile;
27
const NUM_BUFFERED: usize = 50;
28
29
static MID_RXP: SyncOnceCell<Regex> = SyncOnceCell::new();
30
+// does the filename end in market_id
31
+// resources/PRO-1.170258213 == true
32
+// resources/1.170258213 == true
33
+// resources/.gitignore == false
34
fn is_filename_marketid(p: &Path) -> bool {
35
p.file_name()
36
.map(|name| {
37
let name = name.to_string_lossy();
38
39
MID_RXP
- .get_or_init(|| Regex::new(r"^\d{1}.\d{9}$").unwrap())
40
+ .get_or_init(|| Regex::new(r"^.*\d{1}.\d{9}$").unwrap())
41
.is_match(&name)
42
})
43
.unwrap_or(false)
0 commit comments