Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
ffworker
Commits
cd626cd2
Commit
cd626cd2
authored
Dec 06, 2017
by
Julian Rother
Browse files
publish_video: Check if directory exists before using mkdir
parent
ee0f24a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
publish_video.c
View file @
cd626cd2
...
...
@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
ping_job
(
jobid
,
"running"
,
0
);
src
=
buildpath
(
getenv
(
WORKER_TMP
),
jstr
(
jlookup
(
argv
[
4
],
"source"
),
0
));
destdir
=
buildpath
(
getenv
(
WORKER_RELEASED
),
dirname
(
jstr
(
jlookup
(
argv
[
4
],
"path"
),
0
)));
if
(
mkdir
(
destdir
,
02775
)
&&
errno
!=
EEXIST
)
if
(
access
(
destdir
,
F_OK
)
&&
mkdir
(
destdir
,
02775
))
job_failed
(
"Could not create target directory
\"
%s
\"
: %s"
,
destdir
,
strerror
(
errno
));
dest
=
buildpath
(
getenv
(
WORKER_RELEASED
),
jstr
(
jlookup
(
argv
[
4
],
"path"
),
0
));
overwrite_check
(
dest
,
0
,
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