Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
091b791d
Commit
091b791d
authored
May 10, 2019
by
Markus Scheidgen
Browse files
Truely allow z64 file length in package from tar. [skip ci]
parent
92d149d9
Pipeline
#48050
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nomad/migration.py
View file @
091b791d
...
...
@@ -49,7 +49,9 @@ from nomad.processing import FAILURE
default_pid_prefix
=
7000000
""" The default pid prefix for new non migrated calculations """
max_package_size
=
32
*
1024
*
1024
*
1024
# 32 GB
gb
=
1024
*
1024
*
1024
max_package_size
=
32
*
gb
""" The maximum size of a package that will be used as an upload on nomad@FAIRDI """
use_stats_for_filestats_threshold
=
1024
...
...
@@ -333,8 +335,8 @@ class Package(Document):
path
=
tarinfo
.
name
basepath
=
os
.
path
.
basename
(
path
)
with
self
.
package_file
.
open
(
path
,
'w'
)
as
target
:
zip64
=
True
if
tarinfo
.
size
>=
(
2
*
gb
)
else
None
with
self
.
package_file
.
open
(
path
,
'w'
,
force_zip64
=
zip64
)
as
target
:
source
=
tf
.
fileobj
source
.
seek
(
tarinfo
.
offset_data
)
# type: ignore
bufsize
=
tf
.
copybufsize
# type: ignore
...
...
Write
Preview
Supports
Markdown
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