Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
35534a41
Commit
35534a41
authored
Sep 15, 2009
by
Thomas Lotze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: The download API computed MD5 checksums of text files wrong on Windows.
parent
36c0cded
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
CHANGES.txt
CHANGES.txt
+2
-0
src/zc/buildout/download.py
src/zc/buildout/download.py
+1
-1
src/zc/buildout/download.txt
src/zc/buildout/download.txt
+15
-0
No files found.
CHANGES.txt
View file @
35534a41
...
@@ -9,6 +9,8 @@ Bugs fixed:
...
@@ -9,6 +9,8 @@ Bugs fixed:
- Incrementing didn't work properly when extending multiple files.
- Incrementing didn't work properly when extending multiple files.
https://bugs.launchpad.net/zc.buildout/+bug/421022
https://bugs.launchpad.net/zc.buildout/+bug/421022
- The download API computed MD5 checksums of text files wrong on Windows.
1.4.1 (2009-08-27)
1.4.1 (2009-08-27)
==================
==================
...
...
src/zc/buildout/download.py
View file @
35534a41
...
@@ -223,7 +223,7 @@ def check_md5sum(path, md5sum):
...
@@ -223,7 +223,7 @@ def check_md5sum(path, md5sum):
if
md5sum
is
None
:
if
md5sum
is
None
:
return
True
return
True
f
=
open
(
path
)
f
=
open
(
path
,
'rb'
)
checksum
=
md5
()
checksum
=
md5
()
try
:
try
:
chunk
=
f
.
read
(
2
**
16
)
chunk
=
f
.
read
(
2
**
16
)
...
...
src/zc/buildout/download.txt
View file @
35534a41
...
@@ -523,6 +523,21 @@ False
...
@@ -523,6 +523,21 @@ False
True
True
Regressions
-----------
MD5 checksum calculation needs to be reliable on all supported systems, which
requires text files to be treated as binary to avoid implicit line-ending
conversions:
>>> text = 'First line of text.\r\nSecond line.\r\n'
>>> f = open(join(server_data, 'foo.txt'), 'wb')
>>> f.write(text)
>>> f.close()
>>> path, is_temp = Download()(server_url+'foo.txt', md5(text).hexdigest())
>>> remove(path)
Clean up
Clean up
--------
--------
...
...
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