Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2009-06-02 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:59 +0300
commit829409452d85cd6dd9dfc9151f109d6e13a2bb1c (patch)
treee0acaea47044d167f35fa197584dee1bde41c329 /CPP/7zip/UI/FileManager/PanelCrc.cpp
parent8874e4fbc9faabdcff719b9b2ac8ebad4f282bbe (diff)
9.04 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/PanelCrc.cpp')
-rwxr-xr-xCPP/7zip/UI/FileManager/PanelCrc.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/CPP/7zip/UI/FileManager/PanelCrc.cpp b/CPP/7zip/UI/FileManager/PanelCrc.cpp
index 61a84050..aaa645cf 100755
--- a/CPP/7zip/UI/FileManager/PanelCrc.cpp
+++ b/CPP/7zip/UI/FileManager/PanelCrc.cpp
@@ -2,15 +2,11 @@
#include "StdAfx.h"
-extern "C"
-{
- #include "../../../../C/Alloc.h"
- #include "../../../../C/7zCrc.h"
- #include "../../../../C/Sha256.h"
-}
+#include "../../../../C/7zCrc.h"
+#include "../../../../C/Alloc.h"
+#include "../../../../C/Sha256.h"
#include "Common/IntToString.h"
-#include "Common/StringConvert.h"
#include "Windows/Error.h"
#include "Windows/FileFind.h"
@@ -25,6 +21,8 @@ extern "C"
#include "FormatUtils.h"
#include "LangUtils.h"
+#include "../Common/PropIDUtils.h"
+
#include "resource.h"
using namespace NWindows;
@@ -69,7 +67,18 @@ bool CDirEnumerator::GetNextFile(NFind::CFileInfoW &fileInfo, bool &filled, UStr
resPath.Empty();
if (pos >= 0)
resPath = path.Left(pos + 1);
- if (!NFind::FindFile(BasePrefix + path, fileInfo))
+
+ #ifdef _WIN32
+ // it's for "c:" paths/
+ if (BasePrefix.IsEmpty() && path.Length() == 2 && path[1] == ':')
+ {
+ fileInfo.Name = path;
+ fileInfo.Attrib = FILE_ATTRIBUTE_DIRECTORY;
+ fileInfo.Size = 0;
+ }
+ else
+ #endif
+ if (!fileInfo.Find(BasePrefix + path))
{
errorCode = ::GetLastError();
resPath = path;
@@ -285,21 +294,11 @@ static void ConvertByteToHex(unsigned value, wchar_t *s)
}
}
-static void ConvertUInt32ToHex(UInt32 value, wchar_t *s)
-{
- for (int i = 6; i >= 0; i -= 2)
- {
- ConvertByteToHex(value & 0xFF, s + i);
- value >>= 8;
- }
- s[8] = L'\0';
-}
-
void CApp::CalculateCrc()
{
int srcPanelIndex = GetFocusedPanelIndex();
CPanel &srcPanel = Panels[srcPanelIndex];
- if (!srcPanel.IsFSFolder())
+ if (!srcPanel.IsFsOrDrivesFolder())
{
srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208);
return;
@@ -312,7 +311,7 @@ void CApp::CalculateCrc()
CThreadCrc combiner;
for (int i = 0; i < indices.Size(); i++)
combiner.DirEnumerator.FileNames.Add(srcPanel.GetItemRelPath(indices[i]));
- combiner.DirEnumerator.BasePrefix = srcPanel._currentFolderPrefix;
+ combiner.DirEnumerator.BasePrefix = srcPanel.GetFsPath();
combiner.DirEnumerator.FlatMode = GetFlatMode();
{