Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
e5419d2d
Commit
e5419d2d
authored
Oct 02, 2014
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check return code when downloading files
parent
ecdec462
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
main.c
main.c
+5
-0
queries.c
queries.c
+4
-0
No files found.
main.c
View file @
e5419d2d
...
@@ -401,6 +401,11 @@ void parse_config (void) {
...
@@ -401,6 +401,11 @@ void parse_config (void) {
tasprintf
(
&
secret_chat_file_name
,
"%s/%s/%s"
,
get_home_directory
(),
CONFIG_DIRECTORY
,
SECRET_CHAT_FILE
);
tasprintf
(
&
secret_chat_file_name
,
"%s/%s/%s"
,
get_home_directory
(),
CONFIG_DIRECTORY
,
SECRET_CHAT_FILE
);
}
}
tgl_set_download_directory
(
downloads_directory
);
tgl_set_download_directory
(
downloads_directory
);
if
(
!
mkdir
(
downloads_directory
,
CONFIG_DIRECTORY_MODE
))
{
if
(
!
disable_output
)
{
printf
(
"[%s] created
\n
"
,
downloads_directory
);
}
}
}
}
#endif
#endif
...
...
queries.c
View file @
e5419d2d
...
@@ -2415,6 +2415,10 @@ static int download_on_answer (struct query *q) {
...
@@ -2415,6 +2415,10 @@ static int download_on_answer (struct query *q) {
struct
download
*
D
=
q
->
extra
;
struct
download
*
D
=
q
->
extra
;
if
(
D
->
fd
==
-
1
)
{
if
(
D
->
fd
==
-
1
)
{
D
->
fd
=
open
(
D
->
name
,
O_CREAT
|
O_WRONLY
,
0640
);
D
->
fd
=
open
(
D
->
name
,
O_CREAT
|
O_WRONLY
,
0640
);
if
(
D
->
fd
<
0
)
{
vlogprintf
(
E_ERROR
,
"Can not open for writing: %m
\n
"
);
assert
(
D
->
fd
>=
0
);
}
}
}
fetch_int
();
// mtime
fetch_int
();
// mtime
int
len
=
prefetch_strlen
();
int
len
=
prefetch_strlen
();
...
...
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