diff options
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r-- | plugins/PluginUpdater/src/Common.h | 16 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 11 |
2 files changed, 20 insertions, 7 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h index 2b2c23d43b..33a5b031db 100644 --- a/plugins/PluginUpdater/src/Common.h +++ b/plugins/PluginUpdater/src/Common.h @@ -164,15 +164,9 @@ int SafeCreateFilePath(TCHAR *pFolder); #if MIRANDA_VER < 0x0A00
#define db_free(A) DBFreeVariant(A)
+#define db_get_b(A,B,C,D) DBGetContactSettingByte(A,B,C,D)
#define db_set_s(A,B,C,D) DBWriteContactSettingString(A,B,C,D)
-struct VARST : public mir_ptr<TCHAR>
-{
- __forceinline VARST(const TCHAR *str) :
- mir_ptr<TCHAR>( Utils_ReplaceVarsT(str))
- {}
-};
-
template<class T> class mir_ptr
{
T *data;
@@ -187,6 +181,13 @@ public: __inline operator INT_PTR() const { return (INT_PTR)data; }
};
+struct VARST : public mir_ptr<TCHAR>
+{
+ __forceinline VARST(const TCHAR *str) :
+ mir_ptr<TCHAR>( Utils_ReplaceVarsT(str))
+ {}
+};
+
class _A2T
{
TCHAR *buf;
@@ -226,6 +227,7 @@ __forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp) }
char *rtrim(char *str);
+int CreatePathToFileT(const TCHAR *ptszPath);
#define NEWTSTR_ALLOCA(A) (A == NULL)?NULL:_tcscpy((TCHAR*)alloca((_tcslen(A)+1) *sizeof(TCHAR)), A)
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 38d46a6c75..89d817a06f 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -344,6 +344,17 @@ char* rtrim(char *str) }
return str;
}
+
+void CreatePathToFileT(TCHAR* tszFilePath)
+{
+ TCHAR* pszLastBackslash = _tcsrchr(tszFilePath, '\\');
+ if (pszLastBackslash == NULL)
+ return;
+
+ *pszLastBackslash = '\0';
+ CreateDirectoryTreeT(tszFilePath);
+ *pszLastBackslash = '\\';
+}
#endif
// FUNCTION: IsRunAsAdmin()
|