summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/Windows/FileName.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/7zip/unix/CPP/Windows/FileName.cpp')
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileName.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/libs/7zip/unix/CPP/Windows/FileName.cpp b/src/libs/7zip/unix/CPP/Windows/FileName.cpp
index 8443a4af9..b726976fe 100644
--- a/src/libs/7zip/unix/CPP/Windows/FileName.cpp
+++ b/src/libs/7zip/unix/CPP/Windows/FileName.cpp
@@ -5,15 +5,25 @@
#include "Windows/FileName.h"
#include "Common/Wildcard.h"
+// FIXME
+namespace NWindows {
+namespace NFile {
+namespace NDir {
+bool MyGetFullPathName(CFSTR path, FString &resFullPath);
+}}}
+
namespace NWindows {
namespace NFile {
namespace NName {
+bool IsAbsolutePath(const wchar_t *s) { return s[0] == WCHAR_PATH_SEPARATOR; } // FIXME
+
+
void NormalizeDirPathPrefix(CSysString &dirPath)
{
if (dirPath.IsEmpty())
return;
- if (dirPath.ReverseFind(kDirDelimiter) != dirPath.Length() - 1)
+ if (dirPath.ReverseFind(kDirDelimiter) != dirPath.Len() - 1)
dirPath += kDirDelimiter;
}
@@ -22,29 +32,16 @@ void NormalizeDirPathPrefix(UString &dirPath)
{
if (dirPath.IsEmpty())
return;
- if (dirPath.ReverseFind(wchar_t(kDirDelimiter)) != dirPath.Length() - 1)
- dirPath += wchar_t(kDirDelimiter);
+ if (dirPath.ReverseFind(wchar_t(kDirDelimiter)) != dirPath.Len() - 1)
+ dirPath += wchar_t(kDirDelimiter);
}
#endif
-const wchar_t kExtensionDelimiter = L'.';
-
-void SplitNameToPureNameAndExtension(const UString &fullName,
- UString &pureName, UString &extensionDelimiter, UString &extension)
+bool GetFullPath(CFSTR dirPrefix, CFSTR s, FString &res)
{
- int index = fullName.ReverseFind(kExtensionDelimiter);
- if (index < 0)
- {
- pureName = fullName;
- extensionDelimiter.Empty();
- extension.Empty();
- }
- else
- {
- pureName = fullName.Left(index);
- extensionDelimiter = kExtensionDelimiter;
- extension = fullName.Mid(index + 1);
- }
+ res = FString(dirPrefix) + FString(s);
+
+ return true;
}
}}}