Ignore:
Timestamp:
Aug 25, 2008, 7:55:00 PM (15 years ago)
Author:
Peter
Message:

merge patch release 0.4.2 to trunk. Delta 0.4.2-0.4.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/FileUtil.cc

    r1261 r1437  
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    88
    9   This file is part of the yat library, http://trac.thep.lu.se/yat
     9  This file is part of the yat library, http://dev.thep.lu.se/yat
    1010
    1111  The yat library is free software; you can redistribute it and/or
     
    3131#include <iostream>
    3232#include <stdexcept>
     33#include <sstream>
    3334#include <string>
    3435
     
    7071            break;
    7172          case 'd':
    72             struct stat nodestat;
    73             stat(tryme.c_str(),&nodestat);
     73            struct stat64 nodestat;
     74            stat64(tryme.c_str(),&nodestat);
    7475            if (!S_ISDIR(nodestat.st_mode))
    7576              ok = false;
     
    8687  bool FileUtil::exists(void) const
    8788  {
    88     struct stat statt;
    89     if ( stat(path_.c_str(),&statt) && (errno!=ENOENT) )
    90       throw IO_error(std::string("stat(2) call failed with errno: "+errno));
     89    struct stat64 statt;
     90    if ( stat64(path_.c_str(),&statt) && (errno!=ENOENT) ) {
     91      std::stringstream ss;
     92      ss << "stat64(2) call failed with errno: " << errno;
     93      throw IO_error(ss.str());
     94    }
    9195    if (errno) {
    9296      errno = 0; // don't leave errno in state of failure
Note: See TracChangeset for help on using the changeset viewer.