Hide account path in friendly path. There is limited space to print out a full path.

This commit is contained in:
Sacha committed 2013-11-20 01:23:15 +10:00
1 parent a54d58f8e3
commit b04f2d4c45
1 file changed
+15
+15
View File
@@ -1,7 +1,9 @@
#pragma once
#include <string>
#include <string.h>
#include <vector>
#include <stdlib.h>
#include "file/file_util.h"
@@ -25,6 +27,19 @@ public:
}
std::string GetFriendlyPath() {
std::string str = GetPath();
#if defined(BLACKBERRY)
char* home = getenv("PERIMETER_HOME");
if (!strncmp(str.c_str(), home, strlen(home))) {
str = str.substr(strlen(home));
str.insert(0, 1, '~');
}
#elif defined(__linux)
char* home = getenv("HOME");
if (!strncmp(str.c_str(), home, strlen(home))) {
str = str.substr(strlen(home));
str.insert(0, 1, '~');
}
#endif
/*
#ifdef ANDROID
if (!memcmp(str.c_str(), g_Config.memCardDirectory.c_str(), g_Config.memCardDirectory.size()))