Don't treat TMUX_TMPDIR as a potential file

The point of setting TMUX_TMPDIR is to then make any labels from -L go
to that directory.  In the case of makesocketpath() with no TMUX_TMPDIR
set, would set both the path and the default socket to a file.  The
checking of the permissions on the file worked fine in that case, but
when TMUX_TMPDIR is set, won't work on a directory.

This fixes the problem by ensuring the check on the permissions is
performed on directories only.

By Thomas Adam.
1 file changed
tree: 9549ed72fb57664c524b1a0d5de061e37f0968f5
  1. Makefile
  2. arguments.c
  3. array.h
  4. attributes.c
  5. cfg.c
  6. client.c
  7. clock.c
  8. cmd-attach-session.c
  9. cmd-bind-key.c
  10. cmd-break-pane.c
  11. cmd-capture-pane.c
  12. cmd-choose-buffer.c
  13. cmd-choose-client.c
  14. cmd-choose-list.c
  15. cmd-choose-tree.c
  16. cmd-clear-history.c
  17. cmd-clock-mode.c
  18. cmd-command-prompt.c
  19. cmd-confirm-before.c
  20. cmd-copy-mode.c
  21. cmd-delete-buffer.c
  22. cmd-detach-client.c
  23. cmd-display-message.c
  24. cmd-display-panes.c
  25. cmd-find-window.c
  26. cmd-has-session.c
  27. cmd-if-shell.c
  28. cmd-join-pane.c
  29. cmd-kill-pane.c
  30. cmd-kill-server.c
  31. cmd-kill-session.c
  32. cmd-kill-window.c
  33. cmd-link-window.c
  34. cmd-list-buffers.c
  35. cmd-list-clients.c
  36. cmd-list-commands.c
  37. cmd-list-keys.c
  38. cmd-list-panes.c
  39. cmd-list-sessions.c
  40. cmd-list-windows.c
  41. cmd-list.c
  42. cmd-load-buffer.c
  43. cmd-lock-server.c
  44. cmd-move-window.c
  45. cmd-new-session.c
  46. cmd-new-window.c
  47. cmd-paste-buffer.c
  48. cmd-pipe-pane.c
  49. cmd-queue.c
  50. cmd-refresh-client.c
  51. cmd-rename-session.c
  52. cmd-rename-window.c
  53. cmd-resize-pane.c
  54. cmd-respawn-pane.c
  55. cmd-respawn-window.c
  56. cmd-rotate-window.c
  57. cmd-run-shell.c
  58. cmd-save-buffer.c
  59. cmd-select-layout.c
  60. cmd-select-pane.c
  61. cmd-select-window.c
  62. cmd-send-keys.c
  63. cmd-send-prefix.c
  64. cmd-server-info.c
  65. cmd-set-buffer.c
  66. cmd-set-environment.c
  67. cmd-set-option.c
  68. cmd-show-buffer.c
  69. cmd-show-environment.c
  70. cmd-show-messages.c
  71. cmd-show-options.c
  72. cmd-source-file.c
  73. cmd-split-window.c
  74. cmd-start-server.c
  75. cmd-string.c
  76. cmd-suspend-client.c
  77. cmd-swap-pane.c
  78. cmd-swap-window.c
  79. cmd-switch-client.c
  80. cmd-unbind-key.c
  81. cmd-unlink-window.c
  82. cmd-wait-for.c
  83. cmd.c
  84. colour.c
  85. control-notify.c
  86. control.c
  87. environ.c
  88. format.c
  89. grid-cell.c
  90. grid-view.c
  91. grid.c
  92. input-keys.c
  93. input.c
  94. job.c
  95. key-bindings.c
  96. key-string.c
  97. layout-custom.c
  98. layout-set.c
  99. layout.c
  100. log.c
  101. mode-key.c
  102. names.c
  103. notify.c
  104. options-table.c
  105. options.c
  106. paste.c
  107. procname.c
  108. resize.c
  109. screen-redraw.c
  110. screen-write.c
  111. screen.c
  112. server-client.c
  113. server-fn.c
  114. server-window.c
  115. server.c
  116. session.c
  117. signal.c
  118. status.c
  119. tmux.1
  120. tmux.c
  121. tmux.h
  122. tty-acs.c
  123. tty-keys.c
  124. tty-term.c
  125. tty.c
  126. utf8.c
  127. window-choose.c
  128. window-clock.c
  129. window-copy.c
  130. window.c
  131. xmalloc.c
  132. xterm-keys.c