Changeset 809 for trunk


Ignore:
Timestamp:
Aug 6, 2009, 3:24:17 AM (14 years ago)
Author:
Peter Johansson
Message:

fixes #391

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/rmdirhier.cc

    r768 r809  
    2222
    2323#include "rmdirhier.h"
     24#include "utility.h"
    2425
    2526#include <dirent.h>
     
    7172      chmod(dir.c_str(),S_IWRITE);
    7273      if (unlink(dir.c_str()))
    73         throw FileDeleteError(dir);
     74        throw FileDeleteError(concatenate_path(pwd(),dir));
    7475      return;
    7576    }
    7677    if (chdir(dir.c_str()))
    77       throw BadDirectory(dir);
     78      throw BadDirectory(concatenate_path(pwd(),dir));
    7879
    7980   // Delete any remaining directory entries
     
    8182    struct dirent *entry;
    8283    if (!(dp=opendir(".")))
    83       throw DirectoryOpenError(dir);
     84      throw DirectoryOpenError(concatenate_path(pwd(),dir));
    8485    while ((entry=readdir(dp)) != NULL) {
    8586      if ((std::string(entry->d_name) == ".") ||
     
    9394    chdir("..");
    9495    if (rmdir(dir.c_str()))
    95       throw DirectoryDeleteError(dir);
     96      throw DirectoryDeleteError(concatenate_path(pwd(),dir));
    9697  }
    9798
Note: See TracChangeset for help on using the changeset viewer.