The branch, master has been updated
via 710eeb2a33cb91c05251c69d7eb1a572aed44cb4 (commit)
from 3493b7dac7785a1675a2fc70e37c4461bb18043c (commit)
- Log -----------------------------------------------------------------
commit 710eeb2a33cb91c05251c69d7eb1a572aed44cb4
Author: Nicholas Marriott <[email protected]>
Commit: Nicholas Marriott <[email protected]>
Fix previous not to lead fd on failure.
---
tmux.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tmux.c b/tmux.c
index 4ff45d5..f68beee 100644
--- a/tmux.c
+++ b/tmux.c
@@ -130,23 +130,25 @@ areshell(const char *shell)
const char *
get_full_path(const char *wd, const char *path)
{
- int fd;
- static char newpath[MAXPATHLEN];
+ int fd;
+ static char newpath[MAXPATHLEN];
+ const char *retval;
fd = open(".", O_RDONLY);
if (fd == -1)
return (NULL);
- if (chdir(wd) != 0)
- return (NULL);
- if (realpath(path, newpath) != 0)
- return (NULL);
+ retval = NULL;
+ if (chdir(wd) == 0) {
+ if (realpath(path, newpath) == 0)
+ retval = newpath;
+ }
if (fchdir(fd) != 0)
chdir("/");
close(fd);
- return (newpath);
+ return (retval);
}
void
-----------------------------------------------------------------------
Summary of changes:
tmux.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
hooks/post-receive
--
tmux
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs