Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-tus
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-tus
Commits
7efab8c2
Unverified
Commit
7efab8c2
authored
Sep 16, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only truncate once for .done()
parent
9e562f0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tus_file.c
src/tus_file.c
+3
-2
No files found.
src/tus_file.c
View file @
7efab8c2
...
...
@@ -990,12 +990,13 @@ tus_body_to_file(VRT_CTX, struct tus_file_core *fcore)
VCL_BOOL
tus_file_done
(
struct
tus_file_core
*
fcore
,
struct
tus_file_disk
*
fdisk
,
const
char
*
url
)
{
int
fd
;
int
fd
,
need_truncate
;
size_t
l
=
strlen
(
url
);
if
(
l
>=
TUS_PATH_MAX
)
return
(
0
);
need_truncate
=
(
fdisk
->
location_length
==
0
);
strcpy
(
fdisk
->
location
,
url
);
fdisk
->
location_length
=
l
;
...
...
@@ -1007,7 +1008,7 @@ tus_file_done(struct tus_file_core *fcore, struct tus_file_disk *fdisk, const ch
* location
*/
if
(
fdisk
->
type
==
TUS_FINAL
)
if
(
fdisk
->
type
==
TUS_FINAL
||
need_truncate
==
0
)
return
(
1
);
assert
(
fdisk
->
type
==
TUS_SINGLE
);
...
...
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