• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

TextMate is a graphical text editor for OS X 10.7+


Commit MetaInfo

Revisiónc7f267cd12fc253c0844720fb05c010614aa89a1 (tree)
Tiempo2012-08-18 22:30:24
AutorAllan Odgaard <git@abet...>
CommiterAllan Odgaard

Log Message

Show error if failing to unlink old socket

This is in response to issue #183.

Cambiar Resumen

Diferencia incremental

--- a/Applications/TextMate/src/RMateServer.cc
+++ b/Applications/TextMate/src/RMateServer.cc
@@ -124,7 +124,11 @@ namespace
124124 mate_server_t () : _socket_path(path::join(path::temp(), "textmate.sock"))
125125 {
126126 D(DBF_RMateServer, bug("%s\n", _socket_path.c_str()););
127- unlink(_socket_path.c_str());
127+ if(unlink(_socket_path.c_str()) == -1 && errno != ENOENT)
128+ {
129+ OakRunIOAlertPanel("Unable to delete socket left from old instance:\n%s", _socket_path.c_str());
130+ return;
131+ }
128132
129133 socket_t fd(socket(AF_UNIX, SOCK_STREAM, 0));
130134 fcntl(fd, F_SETFD, 1);