m_strRight = paths_GetLongPath(m_strRight);
m_strLeft = paths_GetLongPath(m_strLeft);
+ // Add trailing '\' for directories if its missing
+ if (m_pathsType == IS_EXISTING_DIR)
+ {
+ if (!paths_EndsWithSlash(m_strLeft))
+ m_strLeft += '\\';
+ if (!paths_EndsWithSlash(m_strRight))
+ m_strRight += '\\';
+ }
+
UpdateData(FALSE);
KillTimer(IDT_CHECKFILES);
#endif
}
-bool EndsWithSlash(const CString & s)
+bool paths_EndsWithSlash(const CString & s)
{
return !s.IsEmpty() && IsSlash(s, s.GetLength()-1);
}
return;
// remove any trailing slash
- if (EndsWithSlash(sPath))
+ if (paths_EndsWithSlash(sPath))
sPath.Delete(sPath.GetLength()-1);
}
{
if (path.IsEmpty()) return subpath;
if (subpath.IsEmpty()) return path;
- if (EndsWithSlash(path))
+ if (paths_EndsWithSlash(path))
{
if (IsSlash(subpath, 0))
{
typedef enum { DOES_NOT_EXIST, IS_EXISTING_FILE, IS_EXISTING_DIR } PATH_EXISTENCE;
typedef enum { DIRSLASH, NODIRSLASH } DIRSLASH_TYPE;
+bool paths_EndsWithSlash(const CString & s);
PATH_EXISTENCE paths_DoesPathExist(LPCTSTR szPath);
void paths_normalize(CString & sPath);
CString paths_GetLongPath(const CString & sPath);
2005-04-26 Kimmo
PATCH: [ 1189875 ] Small cleanup for line replace code
Src: MergeDoc.cpp
+ PATCH: [ 1189718 ] OpenDlg: add trailing slash to directory names
+ Src: OpenDlg.cpp paths.cpp paths.h
2005-04-25 Kimmo
BUG: [ 1179790 ] ReadMe-Hungarian.rtf file is missing