mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-17 02:01:11 +10:00
Fix max file size of 4GB (update droplet) (#137)
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user