cwfs: don't use sprint() to fill directory name
sprint() will replace invalid utf8 sequences with U+FFFD which caused directory reads and stats to return the wrong filename. just strcpy the name bytes.
This commit is contained in:
parent
fc06f637cf
commit
76e0968e35
1 changed files with 3 additions and 1 deletions
|
@ -93,7 +93,9 @@ mkdir9p2(Dir* dir, Dentry* dentry, void* strs)
|
|||
|
||||
op = p = strs;
|
||||
dir->name = p;
|
||||
p += sprint(p, "%s", dentry->name)+1;
|
||||
strncpy(p, dentry->name, NAMELEN);
|
||||
p[NAMELEN-1] = 0;
|
||||
p += strlen(p)+1;
|
||||
|
||||
dir->uid = p;
|
||||
uidtostr(p, dentry->uid, 1);
|
||||
|
|
Loading…
Reference in a new issue