Skip to content

Commit

Permalink
fix windows fs truncate return syscall.EBADF
Browse files Browse the repository at this point in the history
  • Loading branch information
AChangFeng committed Dec 6, 2023
1 parent fdcc720 commit 670b00d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/setup-hdfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set -e
sudo apt-get update
sudo apt-get install openjdk-8-jdk -y

HADOOP_VERSION="2.10.1"
wget -q https://dlcdn.apache.org/hadoop/common/hadoop-2.10.1/hadoop-2.10.1.tar.gz
HADOOP_VERSION="2.10.2"
wget -q https://dlcdn.apache.org/hadoop/common/hadoop-2.10.2/hadoop-2.10.2.tar.gz
mkdir ~/app
tar -zxf hadoop-${HADOOP_VERSION}.tar.gz -C ~/app

Expand Down
2 changes: 1 addition & 1 deletion pkg/winfsp/winfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (j *juice) Truncate(path string, size int64, fh uint64) (e int) {
e = -fuse.EBADF
return
}
e = -int(j.vfs.Truncate(ctx, ino, size, 1, nil))
e = -int(j.vfs.Truncate(ctx, ino, size, 0, nil))
return
}

Expand Down

0 comments on commit 670b00d

Please sign in to comment.