File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1825,6 +1825,7 @@ pub const Writer = struct {
1825
1825
if (file_reader .pos != 0 ) break :fcf ;
1826
1826
if (w .pos != 0 ) break :fcf ;
1827
1827
if (limit != .unlimited ) break :fcf ;
1828
+ const size = file_reader .getSize () catch break :fcf ;
1828
1829
const rc = std .c .fcopyfile (in_fd , out_fd , null , .{ .DATA = true });
1829
1830
switch (posix .errno (rc )) {
1830
1831
.SUCCESS = > {},
@@ -1845,10 +1846,9 @@ pub const Writer = struct {
1845
1846
return 0 ;
1846
1847
},
1847
1848
}
1848
- const n = if (file_reader .size ) | size | size else @panic ("TODO figure out how much copied" );
1849
- file_reader .pos = n ;
1850
- w .pos = n ;
1851
- return n ;
1849
+ file_reader .pos = size ;
1850
+ w .pos = size ;
1851
+ return size ;
1852
1852
}
1853
1853
1854
1854
return error .Unimplemented ;
You can’t perform that action at this time.
0 commit comments