diff options
author | marha <marha@users.sourceforge.net> | 2011-01-27 13:44:12 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-27 13:44:12 +0000 |
commit | 11903063211dc368d03f52e090e52ab18ebe3f47 (patch) | |
tree | 71991c8ffd98ed31690190b37f39cfc6244b6595 /tools/mhmake/src/fileinfo.h | |
parent | 59e0042680b01d7e3cf69104921f151ceee13df4 (diff) | |
download | vcxsrv-11903063211dc368d03f52e090e52ab18ebe3f47.tar.gz vcxsrv-11903063211dc368d03f52e090e52ab18ebe3f47.tar.bz2 vcxsrv-11903063211dc368d03f52e090e52ab18ebe3f47.zip |
Implemented mkdir as an internal command
Diffstat (limited to 'tools/mhmake/src/fileinfo.h')
-rw-r--r-- | tools/mhmake/src/fileinfo.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/mhmake/src/fileinfo.h b/tools/mhmake/src/fileinfo.h index 1d70f0df1..b658ac677 100644 --- a/tools/mhmake/src/fileinfo.h +++ b/tools/mhmake/src/fileinfo.h @@ -189,11 +189,16 @@ public: {
return QuoteFileName(m_AbsFileName);
}
+#ifdef WIN32
+#define MINPATHLENGTH 3 // The smallest dir name in windows is 3, e.g. "c:\"
+#else
+#define MINPATHLENGTH 1 // The smallest dir name in linux is 1, e.g. "/"
+#endif
void SetFullFileName(const string &strAbsName)
{
m_AbsFileName=UnquoteFileName(strAbsName);
- // If the last char is path sep strip it
- if (!m_AbsFileName.empty() && m_AbsFileName[m_AbsFileName.length()-1]==OSPATHSEP)
+ // If the last char is path sep strip it, except for the smallest dir name
+ if (m_AbsFileName.length()>MINPATHLENGTH && m_AbsFileName[m_AbsFileName.length()-1]==OSPATHSEP)
m_AbsFileName.resize(m_AbsFileName.length()-1);
}
|