Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5f9e07d

Browse files
committedMar 7, 2025·
fixing local log writing and attributes
1 parent 2fce5a3 commit 5f9e07d

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed
 

‎source/P4VFS.Console/P4VFS.Notes.txt

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
Microsoft P4VFS Release Notes
22

3+
Version [1.29.1.0]
4+
* Fixing bug where log output would not be written to the local log file if remote
5+
logging was enabled and writting to the remote log file had failed.
6+
* Fixing undesirable behavior in 1.29.0.0 where all attribute change directory notifications
7+
from file hydration were suppressed. This could even prevent windows explorer from
8+
showing offline attribute (icon) change without having to refresh. This fix now
9+
allows one attribute change notification when hydration is complete.
10+
311
Version [1.29.0.0]
412
* Fixing virtual file hydration to be excluded from system directory notifications.
513
This avoids unecessary FILE_NOTIFY_INFORMATION or DirectoryWatcher events indicating

‎source/P4VFS.Core/Source/FileOperations.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1184,13 +1184,14 @@ PopulateFileByStream(
11841184
return hr;
11851185
}
11861186

1187-
hr = SetFileAttributesOnHandle(dstFile.Handle(), dstFileAttributes & ~(FILE_ATTRIBUTE_OFFLINE));
1188-
if (FAILED(hr))
1187+
dstFile.Close();
1188+
1189+
if (!SetFileAttributes(fileToPopulate.c_str(), dstFileAttributes & ~(FILE_ATTRIBUTE_OFFLINE)))
11891190
{
1191+
hr = HRESULT_FROM_WIN32(GetLastError());
11901192
return hr;
11911193
}
11921194

1193-
dstFile.Close();
11941195
return S_OK;
11951196
}
11961197

‎source/P4VFS.Core/Source/LogDevice.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,11 @@ void LogDeviceFile::WriteInternal(time_t time, LogChannel::Enum channel, const S
143143

144144
if (m_Impersonate.get())
145145
{
146-
if (FileOperations::ImpersonateFileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str(), m_Impersonate.get()))
147-
return;
146+
FileOperations::ImpersonateFileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str(), m_Impersonate.get());
148147
}
149148
else
150149
{
151-
if (FileOperations::FileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str()))
152-
return;
150+
FileOperations::FileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str());
153151
}
154152
}
155153

‎source/P4VFS.Driver/Include/DriverVersion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#define P4VFS_VER_MAJOR 1 // Increment this number almost never
66
#define P4VFS_VER_MINOR 29 // Increment this number whenever the driver changes
7-
#define P4VFS_VER_BUILD 0 // Increment this number when a major user mode change has been made
7+
#define P4VFS_VER_BUILD 1 // Increment this number when a major user mode change has been made
88
#define P4VFS_VER_REVISION 0 // Increment this number when we rebuild with any change
99

1010
#define P4VFS_VER_STRINGIZE_EX(v) L#v

0 commit comments

Comments
 (0)
Please sign in to comment.