diff options
Diffstat (limited to 'plugins/SendScreenshotPlus/src/Utils.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/Utils.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp index 1da14993b2..19071611a8 100644 --- a/plugins/SendScreenshotPlus/src/Utils.cpp +++ b/plugins/SendScreenshotPlus/src/Utils.cpp @@ -329,28 +329,30 @@ TCHAR* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, TCHAR* pszFilename, TCHAR //--------------------------------------------------------------------------- TCHAR* GetFileNameW(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('\\')); + TCHAR* slash=_tcsrchr(pszPath,_T('\\')); + if(!slash) slash=_tcsrchr(pszPath,_T('/')); if(slash) return mir_t2u(slash+1); else return mir_t2u(pszPath); } TCHAR* GetFileExtW(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('.')); + TCHAR* slash=_tcsrchr(pszPath,_T('.')); if(slash) return mir_t2u(slash); return NULL; } char* GetFileNameA(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('\\')); + TCHAR* slash=_tcsrchr(pszPath,_T('\\')); + if(!slash) slash=_tcsrchr(pszPath,_T('/')); if(slash) return mir_t2a(slash+1); else return mir_t2a(pszPath); } char* GetFileExtA(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('.')); + TCHAR* slash=_tcsrchr(pszPath,_T('.')); if(slash) return mir_t2a(slash); return NULL; |