Skip to content

Commit 43deef2

Browse files
authored
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 e4e0fd4 commit 43deef2

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)