Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pkgar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
pkgar
Commits
73f8802a
Verified
Commit
73f8802a
authored
Mar 13, 2020
by
Jeremy Soller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.1.6 - fix extraction with multiple matching hashes
parent
4a939611
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
Cargo.toml
Cargo.toml
+1
-1
src/bin.rs
src/bin.rs
+6
-1
No files found.
Cargo.toml
View file @
73f8802a
[package]
name
=
"pkgar"
version
=
"0.1.
5
"
version
=
"0.1.
6
"
description
=
"Redox Package Archive"
license
=
"MIT"
authors
=
[
"Jeremy Soller <jackpot51@gmail.com>"
]
...
...
src/bin.rs
View file @
73f8802a
...
...
@@ -262,7 +262,12 @@ pub fn extract(public_path: &str, archive_path: &str, folder: &str) -> Result<()
}
let
entry_hash
=
Hash
::
from
(
entry
.hash
());
let
temp_name
=
format!
(
".pkgar.{}"
,
entry_hash
.to_hex
());
let
temp_name
=
if
let
Some
(
file_name
)
=
entry_path
.file_name
()
.and_then
(|
x
|
x
.to_str
())
{
format!
(
".pkgar.{}"
,
file_name
)
}
else
{
format!
(
".pkgar.{}"
,
entry_hash
.to_hex
())
};
let
temp_path
=
if
let
Some
(
parent
)
=
entry_path
.parent
()
{
fs
::
create_dir_all
(
parent
)
.map_err
(
Error
::
Io
)
?
;
...
...
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