]> git.lyx.org Git - features.git/blobdiff - src/client/client.cpp
Let lyxclient read the whole line of input.
[features.git] / src / client / client.cpp
index 0cbb3e7e8fc5e5428cea496e1a7e528a5f461726..ede4e144255d03607d236856f788523c4ee890c5 100644 (file)
@@ -78,7 +78,7 @@ FileNameList lyxSockets(string const & dir, string const & pid)
 {
        FileNameList dirlist;
 
-       FileName dirpath(dir);
+       FileName dirpath(dir + "/");
 
        if (!dirpath.exists() || !dirpath.isDirectory()) {
                lyxerr << dir << " does not exist or is not a directory."
@@ -94,7 +94,7 @@ FileNameList lyxSockets(string const & dir, string const & pid)
                if (!it->isDirectory())
                        continue;
                string const tmpdir = it->absFilename();
-               if (!suffixIs(tmpdir, "lyx_tmpdir" + pid))
+               if (!contains(tmpdir, "lyx_tmpdir" + pid))
                        continue;
 
                FileName lyxsocket(tmpdir + "/lyxsocket");
@@ -572,7 +572,7 @@ int main(int argc, char * argv[])
                               << endl;
                        return EXIT_FAILURE;
                }
-               cerr << "lyxclient: " << "Connected to " << addr->string() << endl;
+               cerr << "lyxclient: " << "Connected to " << addr->absFilename() << endl;
        }
 
        int const serverfd = server->fd();
@@ -619,7 +619,7 @@ int main(int argc, char * argv[])
                iowatch.wait();
                if (iowatch.isset(0)) {
                        string command;
-                       cin >> command;
+                       getline(cin, command);
                        if (command == "BYE:") {
                                server->writeln("BYE:");
                                saidbye = true;