mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
dll: fuse: fix path arg to release on Create error
When the kernel sends a `Create` message the WinFsp-FUSE layer creates and opens the file (as per Windows semantics). Sometimes an additional operation needs to be performed after the file has been opened, which may fail. In this case the just opened file must be released. In this particular case the WinFsp-FUSE layer used to call `release` with an uninitialized path. This commit fixes the problem. This problem was originally reported in cgofuse (billziss-gh/cgofuse#58)
This commit is contained in:
parent
63f91cc667
commit
f51bdef534
@ -951,12 +951,12 @@ exit:
|
||||
if (CreateOptions & FILE_DIRECTORY_FILE)
|
||||
{
|
||||
if (0 != f->ops.releasedir)
|
||||
f->ops.releasedir(filedesc->PosixPath, &fi);
|
||||
f->ops.releasedir(contexthdr->PosixPath, &fi);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0 != f->ops.release)
|
||||
f->ops.release(filedesc->PosixPath, &fi);
|
||||
f->ops.release(contexthdr->PosixPath, &fi);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user