else
ClusterSize = 2048;
}
+ else if (!wcsicmp(szFs, L"EXT2"))
+ {
+ // auto block size calculation
+ ClusterSize = 0;
+ }
+ else if (!wcsicmp(szFs, L"BtrFS"))
+ {
+ // auto block size calculation
+ ClusterSize = 0;
+ }
else
return FALSE;
} DRIVE_PROP_PAGE;
BOOL
-SH_ShowDriveProperties(WCHAR *pwszDrive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST *apidl)
+SH_ShowDriveProperties(WCHAR *pwszDrive, LPCITEMIDLIST pidlFolder, PCUITEMID_CHILD_ARRAY apidl)
{
HPSXA hpsx = NULL;
HPROPSHEETPAGE hpsp[MAX_PROPERTY_SHEET_PAGE];
if (SendMessageW(hDlgCtrl, CB_GETLBTEXT, iSelIndex, (LPARAM)wszBuf) == CB_ERR)
return;
- szDrive[0] = pContext->Drive + 'A';
+ szDrive[0] = pContext->Drive + L'A';
if (!GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfBytes, NULL))
return;
SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
}
+
+ SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0);
+ EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE);
}
else if (!wcsicmp(wszBuf, L"FAT32"))
{
SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
}
+
+ SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0);
+ EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE);
}
else if (!wcsicmp(wszBuf, L"NTFS"))
{
}
ClusterSize *= 2;
}
+
+ EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
+ }
+ else if (!wcsicmp(wszBuf, L"EXT2"))
+ {
+ if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
+ {
+ TRACE("EXT2 is not supported on hdd larger than 32T current %lu\n", TotalNumberOfBytes.QuadPart);
+ SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
+ return;
+ }
+
+ if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf)))
+ {
+ hDlgCtrl = GetDlgItem(hwndDlg, 28680);
+ SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
+ lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
+ if (lIndex != CB_ERR)
+ SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
+ SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
+ }
+
+ EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
+ }
+ else if (!wcsicmp(wszBuf, L"BtrFS"))
+ {
+ if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
+ {
+ TRACE("BtrFS is not supported on hdd larger than 16E current %lu\n", TotalNumberOfBytes.QuadPart);
+ SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
+ return;
+ }
+
+ if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf)))
+ {
+ hDlgCtrl = GetDlgItem(hwndDlg, 28680);
+ SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
+ lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
+ if (lIndex != CB_ERR)
+ SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
+ SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
+ }
+
+ EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
}
else
{
DWORD ClusterSize;
/* set volume path */
- szDrive[0] = pContext->Drive;
+ szDrive[0] = pContext->Drive + L'A';
/* get filesystem */
hDlgCtrl = GetDlgItem(hwndDlg, 28677);