Closed GoogleCodeExporter closed 9 years ago
Thanks for the issue report.
The problem is caused by the fact that libunrar5 introduces a new feature which
is called QuickOpen. Due to that, the file position is reset every time an
archive is opened. rar2fs assumes the old behaviour for which the file position
was left at the position it was set to before the archive is initialized. The
reason why it works when fmemopen() is used is because fmemopen() actually
positions the file pointer internally and resets it to 0 pretending it is the
start of a file which is not the case for fopen()+fseek(). It is possible to
work around this, but in the absence of fmemopen() support, the functionality
is slightly limited but should still cover most of the common cases. The only
way to solve this and to cover 100% of the cases is to modify the UnRAR
library, which is currently not a feasible action, especially since it is doing
nothing wrong really. I will commit a new patch release of rar2fs as soon as
possible.
Original comment by hans.bec...@gmail.com
on 14 Jan 2014 at 12:29
There is now a patch release 1.19.1 available for download.
Please report back if this version does not resolve your problem.
Original comment by hans.bec...@gmail.com
on 14 Jan 2014 at 9:41
This patch resolves my problem, I can correctly list and access files on
libunrar5.
Regarding the fmemopen issue: my version of uClibc is compiled without support
for this function. There is no limitation as to why it should not be available.
This function is simply a glibc extension and disabled my default.
Answer Y to support the glibc 'custom stream' extension functions
� � fmemopen(),
open_memstream(), and fopencookie().
�
� � � NOTE: There are some minor differences regarding seeking behavior. �
� � � Most people will answer N. �
� �
Original comment by fafar...@gmail.com
on 15 Jan 2014 at 1:33
I will build an uClibc version with this enabled and report back.
Original comment by fafar...@gmail.com
on 15 Jan 2014 at 1:34
Hi,
A last comment on the issue: I have compiled a version of uClibc with fmemopen
support, and let it loose on rar2fs. Version 1.19.0 has the same issue as in my
original post; 1.19.1 works properly. I guess uClibc's comment that "There are
some minor differences regarding seeking behavior." is indeed correct.
Original comment by fafar...@gmail.com
on 16 Jan 2014 at 11:56
I have so far not seen a system with fmemopen() support that failed like you
reported here. But uCLibc is not something that I have been testing recently.
It might very well be that uCLibc has implemented this differently. Another
reason maybe to try eglibc instead? ;)
Case closed.
Original comment by hans.bec...@gmail.com
on 17 Jan 2014 at 12:11
Would be great if you could try the latest version in trunk (that would be
1.19.13) and verify that this still works as expected. Had to adjust the
workaround somewhat.
Original comment by hans.bec...@gmail.com
on 24 Feb 2014 at 9:28
Hi Hans,
The latest version I could find is 1.19.8, which is also listed on the main
page as latest version. I can confirm it is working as expected.
A bit annoying that Google has moved the files to docs as what gets totally
confused about the file name and the scripts I use to build for my Nas needed
some manual interventions :)
Original comment by fafar...@gmail.com
on 7 Mar 2014 at 12:52
Thanks for testing.
I was referring to the version in SVN trunk. Is it possible for you to test it?
# svn checkout http://rar2fs.googlecode.com/svn/trunk/ rar2fs-read-only
# autoreconf -ifs
# configure <options>
Original comment by hans.bec...@gmail.com
on 7 Mar 2014 at 6:50
Ah sorry, didn't try that one.
I did a checkout from svn and tested that version. It works as far as my
testrars are concerned. Thanks!
Original comment by fafar...@gmail.com
on 8 Mar 2014 at 4:16
Original issue reported on code.google.com by
fafar...@gmail.com
on 13 Jan 2014 at 11:37