Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
c4e82fb9
Commit
c4e82fb9
authored
Jul 07, 2018
by
Alexis Williams
Browse files
Fix zip sdists as well
parent
0f25e890
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/CmdSdist.hs
View file @
c4e82fb9
...
...
@@ -273,6 +273,7 @@ packageToSdist verbosity projectRootDir format outputFile pkg = do
when
(
outputFile
/=
"-"
)
$
notice
verbosity
$
"Wrote tarball sdist to "
++
outputFile
++
"
\n
"
Archive
ZipFormat
->
do
let
prefix
=
prettyShow
(
packageId
pkg
)
entries
<-
forM
files
$
\
(
perm
,
file
)
->
do
let
perm'
=
case
perm
of
-- -rwxr-xr-x
...
...
@@ -280,7 +281,7 @@ packageToSdist verbosity projectRootDir format outputFile pkg = do
-- -rw-r--r--
NoExec
->
0o010644
`
shiftL
`
16
contents
<-
BSL
.
readFile
file
return
$
(
Zip
.
toEntry
file
0
contents
)
{
Zip
.
eExternalFileAttributes
=
perm'
}
return
$
(
Zip
.
toEntry
(
prefix
</>
file
)
0
contents
)
{
Zip
.
eExternalFileAttributes
=
perm'
}
let
archive
=
foldr
Zip
.
addEntryToArchive
Zip
.
emptyArchive
entries
write
(
Zip
.
fromArchive
archive
)
when
(
outputFile
/=
"-"
)
$
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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