Update of /cvsroot/wxdevcenter/wxDevCenter/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13725/src
Modified Files:
FileTools.cpp
Log Message:
Create a safe function to create directories.
Fix user configuration profile creation problem.
Index: FileTools.cpp
===================================================================
RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileTools.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FileTools.cpp 14 May 2005 12:15:56 -0000 1.6
--- FileTools.cpp 25 Aug 2005 15:49:25 -0000 1.7
***************
*** 191,192 ****
--- 191,209 ----
+ //////////////////////////////////////////////////////////////////////
+ // Autres fonctions
+
+ // Crée un répertoire et tous les répertoire ascendants si eux-même n'éxistent pas.
+ bool wxSafeMkDir(const wxString& dir, int perm)
+ {
+ wxString strParent = wxPathOnly(dir);
+ if(!wxDirExists(strParent))
+ {
+ if(!wxSafeMkDir(strParent, perm))
+ {
+ return false;
+ }
+ }
+ return wxMkdir( dir, perm);
+ }
+
|