Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/lzma/v4_65/files/CPP/7zip/UI/Common/WorkDir.cpp

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/lzma/v4_65/files/CPP/7zip/UI/Common/WorkDir.cpp
diff --git a/third_party/lzma/v4_65/files/CPP/7zip/UI/Common/WorkDir.cpp b/third_party/lzma/v4_65/files/CPP/7zip/UI/Common/WorkDir.cpp
deleted file mode 100644
index e97275b1c35d27689d8450cc0f3a61fcf5a7f8fb..0000000000000000000000000000000000000000
--- a/third_party/lzma/v4_65/files/CPP/7zip/UI/Common/WorkDir.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// WorkDir.cpp
-
-#include "StdAfx.h"
-
-#include "WorkDir.h"
-
-#include "Common/StringConvert.h"
-#include "Common/Wildcard.h"
-
-#include "Windows/FileName.h"
-#include "Windows/FileDir.h"
-
-static inline UINT GetCurrentCodePage()
- { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; }
-
-using namespace NWindows;
-using namespace NFile;
-using namespace NName;
-
-UString GetWorkDir(const NWorkDir::CInfo &workDirInfo, const UString &path)
-{
- NWorkDir::NMode::EEnum mode = workDirInfo.Mode;
- if (workDirInfo.ForRemovableOnly)
- {
- mode = NWorkDir::NMode::kCurrent;
- UString prefix = path.Left(3);
- if (prefix[1] == L':' && prefix[2] == L'\\')
- {
- UINT driveType = GetDriveType(GetSystemString(prefix, GetCurrentCodePage()));
- if (driveType == DRIVE_CDROM || driveType == DRIVE_REMOVABLE)
- mode = workDirInfo.Mode;
- }
- /*
- CParsedPath parsedPath;
- parsedPath.ParsePath(archiveName);
- UINT driveType = GetDriveType(parsedPath.Prefix);
- if ((driveType != DRIVE_CDROM) && (driveType != DRIVE_REMOVABLE))
- mode = NZipSettings::NWorkDir::NMode::kCurrent;
- */
- }
- switch(mode)
- {
- case NWorkDir::NMode::kCurrent:
- {
- return ExtractDirPrefixFromPath(path);
- }
- case NWorkDir::NMode::kSpecified:
- {
- UString tempDir = workDirInfo.Path;
- NormalizeDirPathPrefix(tempDir);
- return tempDir;
- }
- default:
- {
- UString tempDir;
- if(!NFile::NDirectory::MyGetTempPath(tempDir))
- throw 141717;
- return tempDir;
- }
- }
-}
-
-
-

Powered by Google App Engine
This is Rietveld 408576698