Changeset 424


Ignore:
Timestamp:
Jun 29, 2007, 10:07:18 PM (13 years ago)
Author:
Peter Johansson
Message:

fixes #231

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/File.cc

    r405 r424  
    3939#include <map>
    4040#include <string>
     41#include <sys/stat.h>
    4142
    4243namespace theplu{
     
    254255    tmp.close();
    255256    close(fd);
     257    struct stat nodestat;
     258    stat(path().c_str(),&nodestat);
     259   
    256260    // finally move printed temporary file to original file
    257261    rename(tmpname, path().c_str());
     262    chmod(path().c_str(), nodestat.st_mode);
    258263  }
    259264
Note: See TracChangeset for help on using the changeset viewer.