Fix max file size of 4GB (update droplet) (#137)

This commit is contained in:
DecDuck
2025-07-14 16:43:42 +10:00
committed by GitHub
parent 935ff48b15
commit 4ef2ab2587
4 changed files with 61 additions and 61 deletions

View File

@ -89,7 +89,7 @@ export class FilesystemProvider
const filepath = path.join(this.config.baseDir, game, version);
if (!fs.existsSync(filepath)) return undefined;
const stat = droplet.peekFile(filepath, filename);
return { size: stat };
return { size: Number(stat) };
}
async readFile(
@ -103,8 +103,8 @@ export class FilesystemProvider
const stream = droplet.readFile(
filepath,
filename,
options?.start,
options?.end,
options?.start ? BigInt(options.start) : undefined,
options?.end ? BigInt(options.end) : undefined,
);
if (!stream) return undefined;

View File

@ -86,7 +86,7 @@ export class FlatFilesystemProvider
const filepath = path.join(this.config.baseDir, game);
if (!fs.existsSync(filepath)) return undefined;
const stat = droplet.peekFile(filepath, filename);
return { size: stat };
return { size: Number(stat) };
}
async readFile(
game: string,
@ -99,8 +99,8 @@ export class FlatFilesystemProvider
const stream = droplet.readFile(
filepath,
filename,
options?.start,
options?.end,
options?.start ? BigInt(options.start) : undefined,
options?.end ? BigInt(options.end) : undefined,
);
if (!stream) return undefined;