Check regular file for sparse support after opening
A regular file may be created by the open call. Checking after opening allows sparseFileSupport even if dstFileName does not already exist.
This commit is contained in:
1 parent
c5926fbab8
commit
3bd5aa3404
3 files changed
+22
-12
No files matched your search
@@ -197,6 +197,16 @@ int UTIL_stat(const char* filename, stat_t* statbuf)
|
||||
return UTIL_fstat(-1, filename, statbuf);
|
||||
}
|
||||
|
||||
int UTIL_isFdRegularFile(int fd)
|
||||
{
|
||||
stat_t statbuf;
|
||||
int ret;
|
||||
UTIL_TRACE_CALL("UTIL_isFdRegularFile(%d)", fd);
|
||||
ret = UTIL_fstat(fd, "", &statbuf) && UTIL_isRegularFileStat(&statbuf);
|
||||
UTIL_TRACE_RET(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int UTIL_isRegularFile(const char* infilename)
|
||||
{
|
||||
stat_t statbuf;
|
||||
|
||||
Reference in new issue
Block a user