about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T16·14+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-12T16·14+0100
commitb77037b8fdd89cc06d80c3564e4a4f4a4fe8aa1d (patch)
tree013324b1b3e9e79f25163729abbbd2bb1a70801f /src/libstore/remote-store.cc
parent46f3eb6fdd55394e90b1041e1af5089c0ca87091 (diff)
Silence some warnings on GCC 4.9
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 650f177986a0..16296bdc08d8 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -109,7 +109,7 @@ void RemoteStore::connectToDaemon()
        applications... */
     AutoCloseFD fdPrevDir = open(".", O_RDONLY);
     if (fdPrevDir == -1) throw SysError("couldn't open current directory");
-    chdir(dirOf(socketPath).c_str());
+    if (chdir(dirOf(socketPath).c_str()) == -1) throw SysError("couldn't change current directory");
     Path socketPathRel = "./" + baseNameOf(socketPath);
 
     struct sockaddr_un addr;