[SHELLBTRFS] Upgrade to 1.0.2

CORE-14655
This commit is contained in:
Pierre Schweitzer 2018-05-26 10:58:48 +02:00
parent c7806a6b29
commit 2da53310a4
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
6 changed files with 19 additions and 10 deletions

View file

@ -900,6 +900,7 @@ BOOL BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
if (stream == INVALID_HANDLE_VALUE) { if (stream == INVALID_HANDLE_VALUE) {
ShowError(hwnd, GetLastError()); ShowError(hwnd, GetLastError());
FindClose(h);
goto end; goto end;
} }
@ -909,6 +910,7 @@ BOOL BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
if (!ReadFile(stream, data, fsd.StreamSize.QuadPart, &bytesret, NULL)) { if (!ReadFile(stream, data, fsd.StreamSize.QuadPart, &bytesret, NULL)) {
ShowError(hwnd, GetLastError()); ShowError(hwnd, GetLastError());
FindClose(h);
free(data); free(data);
CloseHandle(stream); CloseHandle(stream);
goto end; goto end;
@ -922,6 +924,7 @@ BOOL BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
if (stream == INVALID_HANDLE_VALUE) { if (stream == INVALID_HANDLE_VALUE) {
ShowError(hwnd, GetLastError()); ShowError(hwnd, GetLastError());
FindClose(h);
if (data) free(data); if (data) free(data);
goto end; goto end;
@ -930,6 +933,7 @@ BOOL BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
if (data) { if (data) {
if (!WriteFile(stream, data, fsd.StreamSize.QuadPart, &bytesret, NULL)) { if (!WriteFile(stream, data, fsd.StreamSize.QuadPart, &bytesret, NULL)) {
ShowError(hwnd, GetLastError()); ShowError(hwnd, GetLastError());
FindClose(h);
free(data); free(data);
CloseHandle(stream); CloseHandle(stream);
goto end; goto end;

View file

@ -1649,6 +1649,7 @@ BOOL BtrfsRecv::do_recv(HANDLE f, UINT64* pos, UINT64 size) {
if (!ReadFile(f, data, cmd.length, NULL, NULL)) { if (!ReadFile(f, data, cmd.length, NULL, NULL)) {
ShowRecvError(IDS_RECV_READFILE_FAILED, GetLastError(), format_message(GetLastError()).c_str()); ShowRecvError(IDS_RECV_READFILE_FAILED, GetLastError(), format_message(GetLastError()).c_str());
free(data);
b = FALSE; b = FALSE;
break; break;
} }

View file

@ -620,15 +620,19 @@ void CALLBACK StartScrubW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nC
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token)) if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token))
goto end; goto end;
if (!LookupPrivilegeValueW(NULL, L"SeManageVolumePrivilege", &luid)) if (!LookupPrivilegeValueW(NULL, L"SeManageVolumePrivilege", &luid)) {
CloseHandle(token);
goto end; goto end;
}
tp.PrivilegeCount = 1; tp.PrivilegeCount = 1;
tp.Privileges[0].Luid = luid; tp.Privileges[0].Luid = luid;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if (!AdjustTokenPrivileges(token, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL)) if (!AdjustTokenPrivileges(token, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL)) {
CloseHandle(token);
goto end; goto end;
}
CloseHandle(token); CloseHandle(token);

View file

@ -157,7 +157,7 @@ DWORD BtrfsSend::Thread() {
goto end2; goto end2;
} }
memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(BTRFS_SEND_MAGIC)); memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(header.magic));
header.version = 1; header.version = 1;
if (!WriteFile(stream, &header, sizeof(header), NULL, NULL)) { if (!WriteFile(stream, &header, sizeof(header), NULL, NULL)) {
@ -654,7 +654,7 @@ static void send_subvol(std::wstring subvol, std::wstring file, std::wstring par
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
goto end2; goto end2;
memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(BTRFS_SEND_MAGIC)); memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(header.magic));
header.version = 1; header.version = 1;
if (!WriteFile(stream, &header, sizeof(header), NULL, NULL)) if (!WriteFile(stream, &header, sizeof(header), NULL, NULL))

View file

@ -61,8 +61,8 @@ IDI_ICON1 ICON "subvol.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,1,0 FILEVERSION 1,0,2,0
PRODUCTVERSION 1,0,1,0 PRODUCTVERSION 1,0,2,0
FILEFLAGSMASK 0x17L FILEFLAGSMASK 0x17L
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -78,12 +78,12 @@ BEGIN
BLOCK "080904b0" BLOCK "080904b0"
BEGIN BEGIN
VALUE "FileDescription", "WinBtrfs shell extension" VALUE "FileDescription", "WinBtrfs shell extension"
VALUE "FileVersion", "1.0.1" VALUE "FileVersion", "1.0.2"
VALUE "InternalName", "btrfs" VALUE "InternalName", "btrfs"
VALUE "LegalCopyright", "Copyright (c) Mark Harmstone 2016-17" VALUE "LegalCopyright", "Copyright (c) Mark Harmstone 2016-18"
VALUE "OriginalFilename", "shellbtrfs.dll" VALUE "OriginalFilename", "shellbtrfs.dll"
VALUE "ProductName", "WinBtrfs" VALUE "ProductName", "WinBtrfs"
VALUE "ProductVersion", "1.0.1" VALUE "ProductVersion", "1.0.2"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -4,7 +4,7 @@
The following FSD are shared with: https://github.com/maharmstone/btrfs. The following FSD are shared with: https://github.com/maharmstone/btrfs.
reactos/drivers/filesystems/btrfs # Synced to 1.0.2 reactos/drivers/filesystems/btrfs # Synced to 1.0.2
reactos/dll/shellext/shellbtrfs # Synced to 1.0.1 reactos/dll/shellext/shellbtrfs # Synced to 1.0.2
reactos/sdk/lib/fslib/btrfslib # Synced to 1.0.1 reactos/sdk/lib/fslib/btrfslib # Synced to 1.0.1
The following FSD are shared with: http://www.ext2fsd.com/ The following FSD are shared with: http://www.ext2fsd.com/