diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26T17·49+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26T17·49+0100 |
commit | 432328cc550cea6b6ab23b3eeca69dc2307c5c74 (patch) | |
tree | 0eab80b0aa4db9624c1592f451a4696c3ad43ce1 /src/libutil/util.cc | |
parent | 509993e5983e333f5a50ee75d71c742590d304fb (diff) |
Remove another unused function
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r-- | src/libutil/util.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 192ff528aa6c..740d767a4ea6 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -326,25 +326,6 @@ void deletePath(const Path & path, unsigned long long & bytesFreed) } -void makePathReadOnly(const Path & path) -{ - checkInterrupt(); - - struct stat st = lstat(path); - - if (!S_ISLNK(st.st_mode) && (st.st_mode & S_IWUSR)) { - if (chmod(path.c_str(), st.st_mode & ~S_IWUSR) == -1) - throw SysError(format("making `%1%' read-only") % path); - } - - if (S_ISDIR(st.st_mode)) { - Strings names = readDirectory(path); - for (Strings::iterator i = names.begin(); i != names.end(); ++i) - makePathReadOnly(path + "/" + *i); - } -} - - static Path tempName(Path tmpRoot, const Path & prefix, bool includePid, int & counter) { |