[BACK]Return to cmd-load-buffer.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-load-buffer.c between version 1.18 and 1.19

version 1.18, 2011/10/23 00:49:25 version 1.19, 2011/10/23 08:34:01
Line 48 
Line 48 
 {  {
         struct args     *args = self->args;          struct args     *args = self->args;
         struct client   *c = ctx->cmdclient;          struct client   *c = ctx->cmdclient;
           struct session  *s;
         FILE            *f;          FILE            *f;
         const char      *path;          const char      *path, *newpath, *wd;
         char            *pdata, *new_pdata, *cause;          char            *pdata, *new_pdata, *cause;
         size_t           psize;          size_t           psize;
         u_int            limit;          u_int            limit;
Line 93 
Line 94 
                 return (1);                  return (1);
         }          }
   
           if (c != NULL)
                   wd = c->cwd;
           else if ((s = cmd_current_session(ctx, 0)) != NULL) {
                   wd = options_get_string(&s->options, "default-path");
                   if (*wd == '\0')
                           wd = s->cwd;
           } else
                   wd = NULL;
           if (wd != NULL && *wd != '\0') {
                   newpath = get_full_path(wd, path);
                   if (newpath != NULL)
                           path = newpath;
           }
         if ((f = fopen(path, "rb")) == NULL) {          if ((f = fopen(path, "rb")) == NULL) {
                 ctx->error(ctx, "%s: %s", path, strerror(errno));                  ctx->error(ctx, "%s: %s", path, strerror(errno));
                 return (-1);                  return (-1);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19