Update grab.ts

This commit is contained in:
freearhey 2023-10-14 18:02:25 +03:00
parent 870e8a11f3
commit 5acd2d94c1

View file

@ -61,7 +61,9 @@ async function main() {
let files: string[] = []
if (options.site) {
files = await storage.list(path.join(SITES_DIR, `${options.site}/*.channels.xml`))
let pattern = path.join(SITES_DIR, options.site, '*.channels.xml')
pattern = pattern.replace(/\\/g, '/')
files = await storage.list(pattern)
} else if (options.channels) {
files = await storage.list(options.channels)
}