Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv17326/src/classes
Modified Files:
MFolder.cpp
Log Message:
filter out slashes from the file paths under Windows, c-client doesn't like them
Index: MFolder.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MFolder.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -b -u -2 -r1.76 -r1.77
--- MFolder.cpp 1 Feb 2002 18:07:25 -0000 1.76
+++ MFolder.cpp 19 Mar 2002 01:39:32 -0000 1.77
@@ -97,4 +97,12 @@
m_server(server), m_login(login), m_password(password)
{
+ // just as in MFolderFromProfile::GetPath() we need to ensure that
+ // we don't have any slashes in the file names under Windows
+#ifdef OS_WIN
+ if ( type == MF_FILE || type == MF_MH )
+ {
+ m_path.Replace("/", "\\");
+ }
+#endif // Windows
}
@@ -622,5 +630,15 @@
String MFolderFromProfile::GetPath() const
{
- return READ_CONFIG(m_profile, MP_FOLDER_PATH);
+ String path = READ_CONFIG(m_profile, MP_FOLDER_PATH);
+
+#ifdef OS_WIN
+ // c-client doesn't accept the files with slashes in names under Windows, so
+ // make sure we replace all of them with the proper backslashes before using
+ // the filename (it is also better to show it like to the user in this form)
+ if ( GetType() == MF_FILE )
+ path.Replace("/", "\\");
+#endif // Windows
+
+ return path;
}
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates