From 993daef9cbed7febf494217f07e40e0a26b3bc06 Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Mon, 15 Mar 2010 00:00:00 +0000 Subject: 9.11 --- CPP/7zip/UI/FileManager/PanelSplitFile.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'CPP/7zip/UI/FileManager') diff --git a/CPP/7zip/UI/FileManager/PanelSplitFile.cpp b/CPP/7zip/UI/FileManager/PanelSplitFile.cpp index 150c71b1..213c2d48 100755 --- a/CPP/7zip/UI/FileManager/PanelSplitFile.cpp +++ b/CPP/7zip/UI/FileManager/PanelSplitFile.cpp @@ -29,6 +29,16 @@ struct CVolSeqName UString ChangedPart; CVolSeqName(): ChangedPart(L"000") {}; + void SetNumDigits(UInt64 numVolumes) + { + ChangedPart = L"000"; + while (numVolumes > 999) + { + numVolumes /= 10; + ChangedPart += L'0'; + } + } + bool ParseName(const UString &name) { if (name.Right(2) != L"01") @@ -81,6 +91,7 @@ class CThreadSplit: public CProgressThreadVirt public: UString FilePath; UString VolBasePath; + UInt64 NumVolumes; CRecordVector VolumeSizes; }; @@ -96,6 +107,7 @@ HRESULT CThreadSplit::ProcessVirt() Byte *buffer = (Byte *)(void *)bufferObject; UInt64 curVolSize = 0; CVolSeqName seqName; + seqName.SetNumDigits(NumVolumes); UInt64 length; if (!inFile.GetLength(length)) return GetLastError(); @@ -226,6 +238,7 @@ void CApp::Split() { CThreadSplit spliter; + spliter.NumVolumes = numVolumes; CProgressDialog &progressDialog = spliter.ProgressDialog; @@ -241,7 +254,7 @@ void CApp::Split() spliter.FilePath = srcPath + itemName; - spliter.VolBasePath = path + itemName; + spliter.VolBasePath = path + itemName; spliter.VolumeSizes = splitDialog.VolumeSizes; // if (splitDialog.VolumeSizes.Size() == 0) return; -- cgit v1.2.3