Better error message

This commit is contained in:
Eelco Dolstra 2014-12-13 16:54:40 +01:00 committed by Ludovic Courtès
parent b499d2efbf
commit 66d086cc26
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ void RemoteStore::connectToDaemon()
applications... */
AutoCloseFD fdPrevDir = open(".", O_RDONLY);
if (fdPrevDir == -1) throw SysError("couldn't open current directory");
if (chdir(dirOf(socketPath).c_str()) == -1) throw SysError("couldn't change current directory");
if (chdir(dirOf(socketPath).c_str()) == -1) throw SysError(format("couldn't change to directory of %1%") % socketPath);
Path socketPathRel = "./" + baseNameOf(socketPath);
struct sockaddr_un addr;