Changeset 1388


Ignore:
Timestamp:
Jul 12, 2011, 3:16:10 AM (10 years ago)
Author:
Peter Johansson
Message:

fixes #505

Location:
branches/0.9-stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9-stable/lib/CopyrightVisitor.cc

    r1239 r1388  
    221221   
    222222    // finally rename file
     223    struct stat nodestat;
     224    stat(path.c_str(), &nodestat);
    223225    rename(tmpname, path);
     226    chmod(path, nodestat.st_mode);
    224227  }
    225228
  • branches/0.9-stable/lib/utility.cc

    r1253 r1388  
    7777
    7878
     79  void chmod(const std::string& filename, mode_t mode)
     80  {
     81    if (::chmod(filename.c_str(), mode))
     82      throw yat::utility::errno_error("chmod: ");
     83  }
     84
     85
    7986  std::string concatenate_path(std::string dir, std::string base)
    8087  {
  • branches/0.9-stable/lib/utility.h

    r1203 r1388  
    5959
    6060  /**
     61   */
     62  void chmod(const std::string& filename, mode_t mode);
     63
     64  /**
    6165     wrapper around GNU C Library function chdir
    6266
  • branches/0.9-stable/test/Makefile.am

    r1387 r1388  
    5858
    5959# tests not yet passing are listed here
    60 XFAIL_TESTS = permission_test.sh
     60XFAIL_TESTS =
    6161
    6262noinst_HEADERS = Suite.h
Note: See TracChangeset for help on using the changeset viewer.