Skip to content

Commit 23d95dd

Browse files
danswannsamualtnorman
authored andcommitted
Skip subdirectories that aren't valid in-game usernames during hsm push (#225)
* Filter invalid usernames * Change regex a little for consistency with those in `hsm.ts`
1 parent 979c2a3 commit 23d95dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/push.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export async function push(
7979
if (hackmudFolder instanceof Error)
8080
return hackmudFolder
8181

82-
const sourceFolderFolders = sourceFolder.filter(({ stats }) => stats.isDirectory())
82+
const sourceFolderFolders = sourceFolder.filter(({ name, stats }) => stats.isDirectory() && /^[a-z_][a-z\d_]{0,24}$/.test(name))
8383

8484
const allUsers = new Set([
8585
...scripts.map(scriptName => ensure(scriptName.split(`.`)[0], HERE)).filter(name => name != `*`),

0 commit comments

Comments
 (0)