[Avida-SVN] r2732 - development/source/tools
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Tue Jul 29 11:30:32 PDT 2008
Author: brysonda
Date: 2008-07-29 14:30:31 -0400 (Tue, 29 Jul 2008)
New Revision: 2732
Modified:
development/source/tools/cDataFileManager.cc
Log:
Ensure that the data directory prefix is ignored when an absolute path is specified.
Modified: development/source/tools/cDataFileManager.cc
===================================================================
--- development/source/tools/cDataFileManager.cc 2008-07-28 20:44:26 UTC (rev 2731)
+++ development/source/tools/cDataFileManager.cc 2008-07-29 18:30:31 UTC (rev 2732)
@@ -70,12 +70,13 @@
// Determine directory prefix, default being the current data directory
cString dir_prefix(m_target_dir);
- if (target[0] == '.' && // Must start with '.' to trigger further testing
- (target.GetSize() == 1 || // If string is exactly "."
- (target.GetSize() > 1 && // or if it ".." or "./" or ".\"
- (target[1] == '.' || target[1] == '/' || target[1] == '\\')
+ if ((target[0] == '.' && // Must start with '.' to trigger further testing
+ (target.GetSize() == 1 || // If string is exactly "."
+ (target.GetSize() > 1 && // or if it ".." or "./" or ".\"
+ (target[1] == '.' || target[1] == '/' || target[1] == '\\')
+ )
)
- )
+ ) || target[0] == '/' // If it is an absolute path, ignore prefix as well
)
{
// Treat path as current working directory relative
More information about the Avida-cvs
mailing list