mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
parent
5b96a48f53
commit
67f34090fb
1 changed files with 3 additions and 1 deletions
|
|
@ -504,7 +504,9 @@ pub fn import() void {
|
|||
pub fn open(fd: std.fs.File) !void {
|
||||
global.fd = fd;
|
||||
|
||||
const size = try fd.getEndPos();
|
||||
// Do not use fd.getEndPos() because that requires newer kernels supporting statx() #261.
|
||||
try fd.seekFromEnd(0);
|
||||
const size = try fd.getPos();
|
||||
if (size < 16) return error.EndOfStream;
|
||||
|
||||
// Read index block
|
||||
|
|
|
|||
Loading…
Reference in a new issue