diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-08-13 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:56 +0300 |
commit | 173c07e166fdf6fcd20f18ea73008f1b628945df (patch) | |
tree | 13ebea85cdc4c16ae93714ff0627ee9f91ad7e08 /CPP/7zip/UI/FileManager/PhysDriveFolder.cpp | |
parent | 3901bf0ab88106a5b031cba7bc18d60cdebf7eef (diff) |
4.59 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/PhysDriveFolder.cpp')
-rwxr-xr-x | CPP/7zip/UI/FileManager/PhysDriveFolder.cpp | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/CPP/7zip/UI/FileManager/PhysDriveFolder.cpp b/CPP/7zip/UI/FileManager/PhysDriveFolder.cpp index d611e096..eb6674b3 100755 --- a/CPP/7zip/UI/FileManager/PhysDriveFolder.cpp +++ b/CPP/7zip/UI/FileManager/PhysDriveFolder.cpp @@ -2,8 +2,8 @@ #include "StdAfx.h" -extern "C" -{ +extern "C" +{ #include "../../../../C/Alloc.h" } @@ -18,7 +18,7 @@ using namespace NWindows; static const UInt32 kBufferSize = (4 << 20); -static STATPROPSTG kProperties[] = +static STATPROPSTG kProperties[] = { { NULL, kpidName, VT_BSTR}, { NULL, kpidSize, VT_UI8} @@ -56,22 +56,16 @@ STDMETHODIMP CPhysDriveFolder::GetNumberOfItems(UInt32 *numItems) STDMETHODIMP CPhysDriveFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) { - NCOM::CPropVariant propVariant; + NCOM::CPropVariant prop; if (itemIndex >= 1) return E_INVALIDARG; switch(propID) { - case kpidIsFolder: - propVariant = false; - break; - case kpidName: - propVariant = _name; - break; - case kpidSize: - propVariant = _length; - break; + case kpidIsDir: prop = false; break; + case kpidName: prop = _name; break; + case kpidSize: prop = _length; break; } - propVariant.Detach(value); + prop.Detach(value); return S_OK; } @@ -93,7 +87,7 @@ STDMETHODIMP CPhysDriveFolder::GetNumberOfProperties(UInt32 *numProperties) return S_OK; } -STDMETHODIMP CPhysDriveFolder::GetPropertyInfo(UInt32 index, +STDMETHODIMP CPhysDriveFolder::GetPropertyInfo(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) { if (index >= sizeof(kProperties) / sizeof(kProperties[0])) @@ -136,13 +130,13 @@ STDMETHODIMP CPhysDriveFolder::Clone(IFolderFolder **resultFolder) STDMETHODIMP CPhysDriveFolder::GetItemFullSize(UInt32 index, PROPVARIANT *value, IProgress * /* progress */) { - NCOM::CPropVariant propVariant; + NCOM::CPropVariant prop; if (index >= 1) return E_INVALIDARG; UInt64 size = 0; HRESULT result = GetLength(size); - propVariant = size; - propVariant.Detach(value); + prop = size; + prop.Detach(value); return result; } @@ -235,7 +229,7 @@ HRESULT CopyFileSpec(LPCWSTR fromPath, LPCWSTR toPath, bool writeToDisk, UInt64 return S_OK; } -STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 * /* indices */, UInt32 numItems, +STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 * /* indices */, UInt32 numItems, const wchar_t *path, IFolderOperationsExtractCallback *callback) { if (numItems == 0) @@ -260,7 +254,7 @@ STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 * /* indices */, UInt32 numIt Int32 writeAskResult; CMyComBSTR destPathResult; - RINOK(callback->AskWrite(GetFullPath(), BoolToInt(false), NULL, &fileSize, + RINOK(callback->AskWrite(GetFullPath(), BoolToInt(false), NULL, &fileSize, destPath, &destPathResult, &writeAskResult)); if (!IntToBool(writeAskResult)) return S_OK; @@ -275,8 +269,8 @@ STDMETHODIMP CPhysDriveFolder::CopyTo(const UInt32 * /* indices */, UInt32 numIt // Move Operations STDMETHODIMP CPhysDriveFolder::MoveTo( - const UInt32 * /* indices */, - UInt32 /* numItems */, + const UInt32 * /* indices */, + UInt32 /* numItems */, const wchar_t * /* path */, IFolderOperationsExtractCallback * /* callback */) { |