Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fontconfig
fontconfig
Commits
5f5ec567
Commit
5f5ec567
authored
Oct 01, 2018
by
Akira TAGOH
Browse files
Do not try updating mtime when unlink was failed
parent
ff5b49be
Pipeline
#5320
passed with stage
in 6 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fccache.c
View file @
5f5ec567
...
...
@@ -171,20 +171,23 @@ FcDirCacheDeleteUUID (const FcChar8 *dir,
}
target
=
FcStrBuildFilename
(
d
,
".uuid"
,
NULL
);
ret
=
unlink
((
char
*
)
target
)
==
0
;
times
[
0
].
tv_sec
=
statb
.
st_atime
;
times
[
1
].
tv_sec
=
statb
.
st_mtime
;
if
(
ret
)
{
times
[
0
].
tv_sec
=
statb
.
st_atime
;
times
[
1
].
tv_sec
=
statb
.
st_mtime
;
#ifdef HAVE_STRUCT_STAT_ST_MTIM
times
[
0
].
tv_usec
=
statb
.
st_atim
.
tv_nsec
/
1000
;
times
[
1
].
tv_usec
=
statb
.
st_mtim
.
tv_nsec
/
1000
;
times
[
0
].
tv_usec
=
statb
.
st_atim
.
tv_nsec
/
1000
;
times
[
1
].
tv_usec
=
statb
.
st_mtim
.
tv_nsec
/
1000
;
#else
times
[
0
].
tv_usec
=
0
;
times
[
1
].
tv_usec
=
0
;
times
[
0
].
tv_usec
=
0
;
times
[
1
].
tv_usec
=
0
;
#endif
if
(
utimes
((
const
char
*
)
d
,
times
)
!=
0
)
{
fprintf
(
stderr
,
"Unable to revert mtime: %s
\n
"
,
d
);
if
(
utimes
((
const
char
*
)
d
,
times
)
!=
0
)
{
fprintf
(
stderr
,
"Unable to revert mtime: %s
\n
"
,
d
);
}
FcHashTableRemove
(
config
->
uuid_table
,
target
);
}
FcHashTableRemove
(
config
->
uuid_table
,
target
);
FcStrFree
(
target
);
bail:
FcStrFree
(
d
);
...
...
Arfrever Frehtes Taifersar Arahesis
@Arfrever
mentioned in issue
#123 (closed)
·
Oct 10, 2018
mentioned in issue
#123 (closed)
mentioned in issue #123
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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