Skip to content

Commit f7f0cb6

Browse files
authored
fix: ブラウザ版でファイル保存できない問題を解決 (#2494)
1 parent 14f9a3d commit f7f0cb6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/backend/browser/fakePath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { uuid4 } from "@/helpers/random";
33

44
const fakePathSchema = z
55
.string()
6-
.regex(/^<browser-dummy-[0-9a-f]+>-.+$/)
6+
.regex(/^<browser-dummy-[-0-9a-f]+>-.+$/)
77
.brand("FakePath");
88
export type FakePath = z.infer<typeof fakePathSchema>;
99

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { isFakePath, createFakePath } from "@/backend/browser/fakePath";
2+
3+
it.each([
4+
"spaced file name",
5+
"filename-with-extension.wav",
6+
"日本語ファイル名",
7+
])("FakePathを作れて検証もできる: %s", (input) => {
8+
const fakePath = createFakePath(input);
9+
expect(isFakePath(fakePath)).toBe(true);
10+
});

0 commit comments

Comments
 (0)