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:
Diffstat (limited to 'CPP/Windows')
-rwxr-xr-xCPP/Windows/FileIO.cpp5
-rwxr-xr-xCPP/Windows/Thread.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/CPP/Windows/FileIO.cpp b/CPP/Windows/FileIO.cpp
index adfbec3d..effd4862 100755
--- a/CPP/Windows/FileIO.cpp
+++ b/CPP/Windows/FileIO.cpp
@@ -31,8 +31,11 @@ bool GetLongPathBase(LPCWSTR s, UString &res)
if (len < 1 || c == L'\\' || c == L'.' && (len == 1 || len == 2 && s[1] == L'.'))
return true;
UString curDir;
+ bool isAbs = false;
if (len > 3)
- if (s[1] != L':' || s[2] != L'\\' || !(c >= L'a' && c <= L'z' || c >= L'A' && c <= L'Z'))
+ isAbs = (s[1] == L':' && s[2] == L'\\' && (c >= L'a' && c <= L'z' || c >= L'A' && c <= L'Z'));
+
+ if (!isAbs)
{
DWORD needLength = ::GetCurrentDirectoryW(MAX_PATH + 1, curDir.GetBuffer(MAX_PATH + 1));
curDir.ReleaseBuffer();
diff --git a/CPP/Windows/Thread.h b/CPP/Windows/Thread.h
index 7edc6827..a46a5688 100755
--- a/CPP/Windows/Thread.h
+++ b/CPP/Windows/Thread.h
@@ -3,8 +3,6 @@
#ifndef __WINDOWS_THREAD_H
#define __WINDOWS_THREAD_H
-#include <process.h>
-
#include "Defs.h"
extern "C"