Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
b7f7d8cd
Unverified
Commit
b7f7d8cd
authored
Aug 09, 2024
by
Daniel Hiltgen
Committed by
GitHub
Aug 09, 2024
Browse files
Merge pull request #6291 from dhiltgen/no_sparse_fail
Don't hard fail on sparse setup error
parents
71b0945f
2fa1db43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
server/download.go
server/download.go
+1
-3
server/sparse_common.go
server/sparse_common.go
+1
-2
server/sparse_windows.go
server/sparse_windows.go
+3
-2
No files found.
server/download.go
View file @
b7f7d8cd
...
...
@@ -216,9 +216,7 @@ func (b *blobDownload) run(ctx context.Context, requestURL *url.URL, opts *regis
return
err
}
defer
file
.
Close
()
if
err
:=
setSparse
(
file
);
err
!=
nil
{
return
err
}
setSparse
(
file
)
_
=
file
.
Truncate
(
b
.
Total
)
...
...
server/sparse_common.go
View file @
b7f7d8cd
...
...
@@ -4,6 +4,5 @@ package server
import
"os"
func
setSparse
(
file
*
os
.
File
)
error
{
return
nil
func
setSparse
(
*
os
.
File
)
{
}
server/sparse_windows.go
View file @
b7f7d8cd
...
...
@@ -6,8 +6,9 @@ import (
"golang.org/x/sys/windows"
)
func
setSparse
(
file
*
os
.
File
)
error
{
return
windows
.
DeviceIoControl
(
func
setSparse
(
file
*
os
.
File
)
{
// exFat (and other FS types) don't support sparse files, so ignore errors
windows
.
DeviceIoControl
(
//nolint:errcheck
windows
.
Handle
(
file
.
Fd
()),
windows
.
FSCTL_SET_SPARSE
,
nil
,
0
,
nil
,
0
,
...
...
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