mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tst: memfs: Cleanup now properly update metadata on MainFileNode
This commit is contained in:
parent
b5cefc59e9
commit
460726df83
@ -409,8 +409,9 @@ call :__ifstest %1 /g ReparsePoints -t SetPointEASNotSupportedTest -t EnumRepars
|
|||||||
if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1
|
if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1
|
||||||
rem IfsTest ReparsePoints seems to have a bug in that it cannot handle STATUS_PENDING for FSCTL_GET_REPARSE_POINT
|
rem IfsTest ReparsePoints seems to have a bug in that it cannot handle STATUS_PENDING for FSCTL_GET_REPARSE_POINT
|
||||||
rmdir /s/q reparspt
|
rmdir /s/q reparspt
|
||||||
rem call :__ifstest %1 /g StreamEnhancements
|
rem StreamEnhancements.StreamRenameTest: WinFsp does not support stream renaming
|
||||||
rem if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1
|
call :__ifstest %1 /g StreamEnhancements -t StreamRenameTest
|
||||||
|
if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1
|
||||||
for %%d in (!IfsTestDirectories!) do (
|
for %%d in (!IfsTestDirectories!) do (
|
||||||
if exist %%d (echo :ifstest directory %%d still exists & set IfsTestMemfsExit=1)
|
if exist %%d (echo :ifstest directory %%d still exists & set IfsTestMemfsExit=1)
|
||||||
)
|
)
|
||||||
|
@ -967,13 +967,19 @@ static VOID Cleanup(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
{
|
{
|
||||||
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
||||||
MEMFS_FILE_NODE *FileNode = (MEMFS_FILE_NODE *)FileNode0;
|
MEMFS_FILE_NODE *FileNode = (MEMFS_FILE_NODE *)FileNode0;
|
||||||
|
#if defined(MEMFS_NAMED_STREAMS)
|
||||||
|
MEMFS_FILE_NODE *MainFileNode = 0 != FileNode->MainFileNode ?
|
||||||
|
FileNode->MainFileNode : FileNode;
|
||||||
|
#else
|
||||||
|
MEMFS_FILE_NODE *MainFileNode = FileNode;
|
||||||
|
#endif
|
||||||
|
|
||||||
assert(0 != Flags); /* FSP_FSCTL_VOLUME_PARAMS::PostCleanupWhenModifiedOnly ensures this */
|
assert(0 != Flags); /* FSP_FSCTL_VOLUME_PARAMS::PostCleanupWhenModifiedOnly ensures this */
|
||||||
|
|
||||||
if (Flags & FspCleanupSetArchiveBit)
|
if (Flags & FspCleanupSetArchiveBit)
|
||||||
{
|
{
|
||||||
if (0 == (FileNode->FileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
if (0 == (MainFileNode->FileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||||
FileNode->FileInfo.FileAttributes |= FILE_ATTRIBUTE_ARCHIVE;
|
MainFileNode->FileInfo.FileAttributes |= FILE_ATTRIBUTE_ARCHIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & (FspCleanupSetLastAccessTime | FspCleanupSetLastWriteTime | FspCleanupSetChangeTime))
|
if (Flags & (FspCleanupSetLastAccessTime | FspCleanupSetLastWriteTime | FspCleanupSetChangeTime))
|
||||||
@ -981,11 +987,11 @@ static VOID Cleanup(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
UINT64 SystemTime = MemfsGetSystemTime();
|
UINT64 SystemTime = MemfsGetSystemTime();
|
||||||
|
|
||||||
if (Flags & FspCleanupSetLastAccessTime)
|
if (Flags & FspCleanupSetLastAccessTime)
|
||||||
FileNode->FileInfo.LastAccessTime = SystemTime;
|
MainFileNode->FileInfo.LastAccessTime = SystemTime;
|
||||||
if (Flags & FspCleanupSetLastWriteTime)
|
if (Flags & FspCleanupSetLastWriteTime)
|
||||||
FileNode->FileInfo.LastWriteTime = SystemTime;
|
MainFileNode->FileInfo.LastWriteTime = SystemTime;
|
||||||
if (Flags & FspCleanupSetChangeTime)
|
if (Flags & FspCleanupSetChangeTime)
|
||||||
FileNode->FileInfo.ChangeTime = SystemTime;
|
MainFileNode->FileInfo.ChangeTime = SystemTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & FspCleanupSetAllocationSize)
|
if (Flags & FspCleanupSetAllocationSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user