diff -r 5dcf40af7c2d -r 30f81efce00b hgext/largefiles/proto.py --- a/hgext/largefiles/proto.py Mon Dec 16 20:38:13 2024 -0500 +++ b/hgext/largefiles/proto.py Mon Dec 16 20:40:04 2024 -0500 @@ -74,7 +74,7 @@ # TODO: fix the fd leak here f = open(filename, 'rb') - length = os.fstat(f.fileno())[6] + length = os.fstat(f.fileno()).st_size # Since we can't set an HTTP content-length header here, and # Mercurial core provides no way to give the length of a streamres