mirror of
https://github.com/rclone/rclone.git
synced 2025-04-11 09:46:14 +08:00
serve nfs: fix missing inode numbers which was messing up ls -laR
Some checks failed
Docker beta build / Build image job (push) Has been cancelled
Some checks failed
Docker beta build / Build image job (push) Has been cancelled
In 6ba3e2485399a918 serve nfs: fix incorrect user id and group id exported to NFS #7973 We updated the stat function to output uid and gid. However this set the inode numbers of everything to -1. This causes a problem with doing `ls -laR` giving "not listing already-listed directory" as it uses inode numbers to see if it has listed a directory or not. This patch reads the inode number from the vfs.Node and sets it in the Stat output.
This commit is contained in:
parent
424d8e3123
commit
30ef1ddb23
@ -3,7 +3,6 @@
|
|||||||
package nfs
|
package nfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
@ -37,7 +36,7 @@ func setSys(fi os.FileInfo) {
|
|||||||
Nlink: 1,
|
Nlink: 1,
|
||||||
UID: vfs.Opt.UID,
|
UID: vfs.Opt.UID,
|
||||||
GID: vfs.Opt.GID,
|
GID: vfs.Opt.GID,
|
||||||
Fileid: math.MaxUint64, // without this mounting doesn't work on Linux
|
Fileid: node.Inode(), // without this mounting doesn't work on Linux
|
||||||
}
|
}
|
||||||
node.SetSys(&stat)
|
node.SetSys(&stat)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user