Skip to content

Commit 0bbb7d7

Browse files
Kawa-oneechanScrewtapello
authored andcommitted
Update file.hpp
Correct recursive truncate call, should fix #3
1 parent 3fb2114 commit 0bbb7d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

file.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct file : inode {
3737

3838
static auto truncate(const string& filename, uint64_t size) -> bool {
3939
#if defined(API_POSIX)
40-
return truncate(filename, size) == 0;
40+
return ::truncate(filename, size) == 0;
4141
#elif defined(API_WINDOWS)
4242
if(auto fp = _wfopen(utf16_t(filename), L"rb+")) {
4343
bool result = _chsize(fileno(fp), size) == 0;

0 commit comments

Comments
 (0)