On Fri, Apr 06, 2007 at 03:12:07PM +0200, Georg Baum wrote: > Am Donnerstag, 5. April 2007 11:41 schrieb François Amato: > > > LyX could not create the temporary directory 'C:/Documents and > > Settings/François Amato/Local Settings/Temp/lyx_tmpdir2500a03240' > > Error: Impossible de créer un répertoire temporaire > > ---------------------------------------- > > Impossible de créer un répertoire temporaire > > dans C:/Documents and Settings/François Amato/Local Settings/Temp/. > > Vérifiez que ce chemin > > existe et qu'il est ouvert en écriture puis réessayez. > > Warning: Impossible d'enlever le répertoire temporaire > > ---------------------------------------- > > Impossible d'enlever le répertoire temporaire > > Completed > > > > > > When I go to C:/Documents and Settings/François Amato/Local > Settings/Temp/ > > I see no lyx_tmpdir directory, but instead a 0 byte file with this same > > name. What can I do to change this ? (Lyx 1.4.x works fine) > > I just committed a change that should fix this bug > (http://bugzilla.lyx.org/show_bug.cgi?id=3410). > > I might have forgotten something in windows-only code, but I don't think so > since I was very careful. It would be nice if some windows user could > confirm that this bug is fixed now.
I don't think that your commit fixes 3410. I was working on the attached patch that fixes it. The only relevant bit is in tempname.C, all other changes are consequential to that. I'll adapt this to your last commit. -- Enrico
Index: src/lyxsocket.C =================================================================== --- src/lyxsocket.C (revision 17736) +++ src/lyxsocket.C (working copy) @@ -62,7 +62,7 @@ LyXServerSocket::LyXServerSocket(LyXFunc // Needed by xdvi support::setEnv("XEDITOR", "lyxclient -g %f %l"); // Needed by lyxclient - support::setEnv("LYXSOCKET", address_); + support::setEnv("LYXSOCKET", to_filesystem8bit(from_utf8(address_))); theApp()->registerSocketCallback( fd_, Index: src/support/tempname.C =================================================================== --- src/support/tempname.C (revision 17736) +++ src/support/tempname.C (working copy) @@ -109,7 +109,7 @@ FileName const tempName(FileName const & #endif LYXERR(Debug::FILES) << "Temporary file `" << t << "' created." << endl; - return FileName(t); + return FileName(to_utf8(from_filesystem8bit(t))); } else { LYXERR(Debug::FILES) << "LyX Error: Unable to create temporary file." Index: src/support/socktools.C =================================================================== --- src/support/socktools.C (revision 17736) +++ src/support/socktools.C (working copy) @@ -77,8 +77,9 @@ int listen(string const & name, int queu int fd; // File descriptor for the socket sockaddr_un addr; // Structure that hold the socket address - // We use 'name' to fill 'addr' - string::size_type len = name.size(); + // We use 'localname' to fill 'addr' + string const localname = to_filesystem8bit(from_utf8(name)); + string::size_type len = localname.size(); // the field sun_path in sockaddr_un is a char[108] if (len > 107) { lyxerr << "lyx: Socket address '" << name << "' too long." @@ -87,7 +88,7 @@ int listen(string const & name, int queu } // Synonims for AF_UNIX are AF_LOCAL and AF_FILE addr.sun_family = AF_UNIX; - name.copy(addr.sun_path, 107); + localname.copy(addr.sun_path, 107); addr.sun_path[len] = '\0'; // This creates a file descriptor for the socket Index: src/client/client.C =================================================================== --- src/client/client.C (revision 17736) +++ src/client/client.C (working copy) @@ -534,16 +534,16 @@ int main(int argc, char * argv[]) scoped_ptr<LyXDataSocket> server; if (!cmdline::serverAddress.empty()) { - server.reset(new LyXDataSocket(to_utf8(cmdline::serverAddress))); + server.reset(new LyXDataSocket(to_filesystem8bit(cmdline::serverAddress))); if (!server->connected()) { cerr << "lyxclient: " << "Could not connect to " - << to_utf8(cmdline::serverAddress) << endl; + << to_filesystem8bit(cmdline::serverAddress) << endl; return EXIT_FAILURE; } } else { // We have to look for an address. // serverPid can be empty. - vector<fs::path> addrs = support::lyxSockets(to_utf8(cmdline::mainTmp), cmdline::serverPid); + vector<fs::path> addrs = support::lyxSockets(to_filesystem8bit(cmdline::mainTmp), cmdline::serverPid); vector<fs::path>::const_iterator addr = addrs.begin(); vector<fs::path>::const_iterator end = addrs.end(); for (; addr != end; ++addr) {