util: Check for file being NULL in DirectoryCommit
This commit is contained in:
1 parent
4574904038
commit
ef712298c3
1 file changed
+2
@@ -1047,8 +1047,10 @@ void DirectoryCommit(const fs::path &dirname)
|
|||||||
{
|
{
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
FILE* file = fsbridge::fopen(dirname, "r");
|
FILE* file = fsbridge::fopen(dirname, "r");
|
||||||
|
if (file) {
|
||||||
fsync(fileno(file));
|
fsync(fileno(file));
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user