Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
17222e95
Commit
17222e95
authored
Jan 20, 2009
by
Viliam Mateicka
Committed by
Max Kellermann
Jan 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archiveapi: adding seeking support in zip archives
parent
1379db37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
zip_plugin.c
src/archive/zip_plugin.c
+8
-2
No files found.
src/archive/zip_plugin.c
View file @
17222e95
...
...
@@ -111,8 +111,8 @@ zip_setup_stream(struct archive_file *file, struct input_stream *is)
is
->
plugin
=
&
zip_inputplugin
;
//insert back reference
is
->
archive
=
context
;
//we are
not seekable
is
->
seekable
=
fals
e
;
//we are
seekable (but its not recommendent to do so)
is
->
seekable
=
tru
e
;
}
...
...
@@ -163,6 +163,12 @@ static bool
zip_is_seek
(
G_GNUC_UNUSED
struct
input_stream
*
is
,
G_GNUC_UNUSED
off_t
offset
,
G_GNUC_UNUSED
int
whence
)
{
zip_context
*
context
=
(
zip_context
*
)
is
->
archive
;
zzip_off_t
ofs
=
zzip_seek
(
context
->
file
,
offset
,
whence
);
if
(
ofs
!=
-
1
)
{
is
->
offset
=
ofs
;
return
true
;
}
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment