Ignore:
Timestamp:
Mar 14, 2010, 9:57:53 PM (12 years ago)
Author:
Peter
Message:

merged release 0.6.1

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/yat/utility/FileUtil.cc

    r2125 r2217  
    66  Copyright (C) 2006 Jari Häkkinen
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009 Peter Johansson
     8  Copyright (C) 2009, 2010 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    6666    if (!exists()) {
    6767      std::string::size_type pos=path_.find_last_of('/');
    68       tryme = ( (pos!=std::string::npos) ? path_.substr(0,pos) : "." );
     68      if (pos == std::string::npos)
     69        tryme = ".";
     70      else if (pos == 0)
     71        tryme = "/";
     72      else
     73        tryme.resize(pos);
    6974    }
    7075
Note: See TracChangeset for help on using the changeset viewer.