Skip to content

Commit

Permalink
fs.move cause error in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
fourside committed Jan 13, 2022
1 parent 859d985 commit 4761ed7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion radiko/import_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"std/encoding/base64": "https://deno.land/[email protected]/encoding/base64.ts",
"std/datetime": "https://deno.land/[email protected]/datetime/mod.ts",
"std/fmt/printf": "https://deno.land/[email protected]/fmt/printf.ts",
"std/fs": "https://deno.land/[email protected]/fs/mod.ts",
"std/fs/copy": "https://deno.land/[email protected]/fs/copy.ts",
"x/aws_api/client": "https://deno.land/x/[email protected]/client/mod.ts",
"x/aws_api/sqs": "https://deno.land/x/[email protected]/services/sqs/mod.ts",
"x/zod": "https://deno.land/x/[email protected]/mod.ts",
Expand Down
5 changes: 3 additions & 2 deletions radiko/src/recorder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { formatTimeForFfmpeg } from "./date.ts";
import { RecRadikoError } from "./rec-radiko-error.ts";
import { moveSync } from "std/fs";
import { copySync } from "std/fs/copy";

export type RecordMeta = {
station: string;
Expand Down Expand Up @@ -110,5 +110,6 @@ async function runPipedProcess(cmd: string[]): Promise<
}

function moveFile(filePath: string, targetPath: string): void {
moveSync(filePath, targetPath);
copySync(filePath, targetPath);
Deno.removeSync(filePath);
}

0 comments on commit 4761ed7

Please sign in to comment.