diff options
Diffstat (limited to 'plugins/Folders/src/utils.cpp')
-rw-r--r-- | plugins/Folders/src/utils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Folders/src/utils.cpp b/plugins/Folders/src/utils.cpp index a2ba6668d7..748da0d592 100644 --- a/plugins/Folders/src/utils.cpp +++ b/plugins/Folders/src/utils.cpp @@ -89,11 +89,11 @@ char *StrReplace(char *source, const char *what, const char *withWhat) {
size_t whatLen = strlen(what);
size_t withWhatLen = strlen(withWhat);
-
+
char *pos;
while ((pos = strstr(source, what))) {
size_t minLen = min(whatLen, withWhatLen);
- StrCopy(source, pos - source, withWhat, minLen);
+ StrCopy(source, pos - source, withWhat, minLen);
size_t index = pos - source + minLen;
if (whatLen > withWhatLen)
StrDelete(source, index, whatLen - withWhatLen);
@@ -113,7 +113,7 @@ wchar_t *StrReplace(wchar_t *source, const wchar_t *what, const wchar_t *withWha wchar_t *pos;
while ((pos = wcsstr(source, what))) {
size_t minLen = min(whatLen, withWhatLen);
- StrCopy(source, pos - source, withWhat, minLen);
+ StrCopy(source, pos - source, withWhat, minLen);
size_t index = pos - source + minLen;
if (whatLen > withWhatLen)
StrDelete(source, index, whatLen - withWhatLen);
@@ -162,7 +162,7 @@ void RemoveDirectories(TCHAR *path) TCHAR *pos;
TCHAR *buffer = NEWWSTR_ALLOCA(path);
if (!(GetFileAttributes(buffer) & FILE_ATTRIBUTE_REPARSE_POINT))
- RemoveDirectory(buffer);
+ RemoveDirectory(buffer);
while (pos = _tcsrchr(buffer, '\\')) {
pos[0] = '\0';
if (!(GetFileAttributes(buffer) & FILE_ATTRIBUTE_REPARSE_POINT))
@@ -173,7 +173,7 @@ void RemoveDirectories(TCHAR *path) int DirectoryExists(TCHAR *path)
{
TCHAR buffer[4096];
- GetCurrentDirectory( SIZEOF(buffer), buffer);
+ GetCurrentDirectory(SIZEOF(buffer), buffer);
int res = SetCurrentDirectory(path);
SetCurrentDirectory(buffer);
return res;
@@ -183,7 +183,7 @@ int GetStringFromDatabase(char *szSettingName, const wchar_t *szError, TCHAR *sz {
size_t len;
DBVARIANT dbv;
- if ( db_get_ws(NULL, ModuleName, szSettingName, &dbv) == 0) {
+ if (db_get_ws(NULL, ModuleName, szSettingName, &dbv) == 0) {
size_t tmp = _tcslen(dbv.ptszVal);
len = (tmp < size - 1) ? tmp : size - 1;
_tcsncpy(szResult, dbv.ptszVal, len);
|