[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) {
ShowError(hwnd, GetLastError());
FindClose(h);
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)) {
ShowError(hwnd, GetLastError());
FindClose(h);
free(data);
CloseHandle(stream);
goto end;
@ -922,6 +924,7 @@ BOOL BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
if (stream == INVALID_HANDLE_VALUE) {
ShowError(hwnd, GetLastError());
FindClose(h);
if (data) free(data);
goto end;
@ -930,6 +933,7 @@ BOOL BtrfsContextMenu::reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir
if (data) {
if (!WriteFile(stream, data, fsd.StreamSize.QuadPart, &bytesret, NULL)) {
ShowError(hwnd, GetLastError());
FindClose(h);
free(data);
CloseHandle(stream);
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)) {
ShowRecvError(IDS_RECV_READFILE_FAILED, GetLastError(), format_message(GetLastError()).c_str());
free(data);
b = FALSE;
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))
goto end;
if (!LookupPrivilegeValueW(NULL, L"SeManageVolumePrivilege", &luid))
if (!LookupPrivilegeValueW(NULL, L"SeManageVolumePrivilege", &luid)) {
CloseHandle(token);
goto end;
}
tp.PrivilegeCount = 1;
tp.Privileges[0].Luid = luid;
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;
}
CloseHandle(token);

View file

@ -157,7 +157,7 @@ DWORD BtrfsSend::Thread() {
goto end2;
}
memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(BTRFS_SEND_MAGIC));
memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(header.magic));
header.version = 1;
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))
goto end2;
memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(BTRFS_SEND_MAGIC));
memcpy(header.magic, BTRFS_SEND_MAGIC, sizeof(header.magic));
header.version = 1;
if (!WriteFile(stream, &header, sizeof(header), NULL, NULL))

View file

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

View file

@ -4,7 +4,7 @@
The following FSD are shared with: https://github.com/maharmstone/btrfs.
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
The following FSD are shared with: http://www.ext2fsd.com/