summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/fsdirrwops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs/fsdirrwops.cpp')
-rw-r--r--src/fs/virtfs/fsdirrwops.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fs/virtfs/fsdirrwops.cpp b/src/fs/virtfs/fsdirrwops.cpp
index 009eb5377..47497a9d3 100644
--- a/src/fs/virtfs/fsdirrwops.cpp
+++ b/src/fs/virtfs/fsdirrwops.cpp
@@ -177,9 +177,9 @@ namespace FsDir
const int64_t rc = cnt / size;
#endif // USE_FILE_FOPEN
+#ifndef USE_FILE_FOPEN
if (rc != static_cast<int64_t>(maxnum))
{
-#ifndef USE_FILE_FOPEN
const int64_t pos = lseek(fd, 0, SEEK_CUR);
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
@@ -187,8 +187,8 @@ namespace FsDir
reportAlways("FsDir::fileLength error.");
return CAST_S32(rc);
}
-#endif // USE_FILE_FOPEN
}
+#endif // USE_FILE_FOPEN
return CAST_S32(rc);
}
@@ -213,9 +213,9 @@ namespace FsDir
const int64_t rc = cnt / size;
#endif // USE_FILE_FOPEN
+#ifndef USE_FILE_FOPEN
if (rc != static_cast<int64_t>(maxnum))
{
-#ifndef USE_FILE_FOPEN
const int64_t pos = lseek(fd, 0, SEEK_CUR);
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
@@ -223,8 +223,9 @@ namespace FsDir
reportAlways("FsDir::fileLength error.");
return CAST_S32(rc);
}
-#endif // USE_FILE_FOPEN
}
+#endif // USE_FILE_FOPEN
+
return CAST_S32(rc);
}