about summary refs log tree commit diff
path: root/src/libstore/pathlocks.cc
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-07-30T11·27+0100
committerJörg Thalheim <joerg@thalheim.io>2017-07-30T11·32+0100
commit2fd8f8bb99a2832b3684878c020ba47322e79332 (patch)
tree65a667fbc746f4ff8efcaca3c0a58565985f26a5 /src/libstore/pathlocks.cc
parentc7654bc491d9ce7c1fbadecd7769418fa79a2060 (diff)
Replace Unicode quotes in user-facing strings by ASCII
Relevant RFC: NixOS/rfcs#4

$ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r--src/libstore/pathlocks.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc
index bf7ad3d21851..587f29598851 100644
--- a/src/libstore/pathlocks.cc
+++ b/src/libstore/pathlocks.cc
@@ -19,7 +19,7 @@ AutoCloseFD openLockFile(const Path & path, bool create)
 
     fd = open(path.c_str(), O_CLOEXEC | O_RDWR | (create ? O_CREAT : 0), 0600);
     if (!fd && (create || errno != ENOENT))
-        throw SysError(format("opening lock file ‘%1%’") % path);
+        throw SysError(format("opening lock file '%1%'") % path);
 
     return fd;
 }
@@ -109,12 +109,12 @@ bool PathLocks::lockPaths(const PathSet & _paths,
         checkInterrupt();
         Path lockPath = path + ".lock";
 
-        debug(format("locking path ‘%1%’") % path);
+        debug(format("locking path '%1%'") % path);
 
         {
             auto lockedPaths(lockedPaths_.lock());
             if (lockedPaths->count(lockPath))
-                throw Error("deadlock: trying to re-acquire self-held lock ‘%s’", lockPath);
+                throw Error("deadlock: trying to re-acquire self-held lock '%s'", lockPath);
             lockedPaths->insert(lockPath);
         }
 
@@ -141,19 +141,19 @@ bool PathLocks::lockPaths(const PathSet & _paths,
                     }
                 }
 
-                debug(format("lock acquired on ‘%1%’") % lockPath);
+                debug(format("lock acquired on '%1%'") % lockPath);
 
                 /* Check that the lock file hasn't become stale (i.e.,
                    hasn't been unlinked). */
                 struct stat st;
                 if (fstat(fd.get(), &st) == -1)
-                    throw SysError(format("statting lock file ‘%1%’") % lockPath);
+                    throw SysError(format("statting lock file '%1%'") % lockPath);
                 if (st.st_size != 0)
                     /* This lock file has been unlinked, so we're holding
                        a lock on a deleted file.  This means that other
                        processes may create and acquire a lock on
                        `lockPath', and proceed.  So we must retry. */
-                    debug(format("open lock file ‘%1%’ has become stale") % lockPath);
+                    debug(format("open lock file '%1%' has become stale") % lockPath);
                 else
                     break;
             }
@@ -191,9 +191,9 @@ void PathLocks::unlock()
 
         if (close(i.first) == -1)
             printError(
-                format("error (ignored): cannot close lock file on ‘%1%’") % i.second);
+                format("error (ignored): cannot close lock file on '%1%'") % i.second);
 
-        debug(format("lock released on ‘%1%’") % i.second);
+        debug(format("lock released on '%1%'") % i.second);
     }
 
     fds.clear();