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

Diff for /src/usr.bin/tmux/cmd-save-buffer.c between version 1.11 and 1.12

version 1.11, 2011/10/23 00:49:25 version 1.12, 2011/10/23 08:34:01
Line 45 
Line 45 
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct client           *c = ctx->cmdclient;          struct client           *c = ctx->cmdclient;
           struct session          *s;
         struct paste_buffer     *pb;          struct paste_buffer     *pb;
         const char              *path;          const char              *path, *newpath, *wd;
         char                    *cause;          char                    *cause;
         int                      buffer;          int                      buffer;
         mode_t                   mask;          mode_t                   mask;
Line 80 
Line 81 
                 }                  }
                 bufferevent_write(c->stdout_event, pb->data, pb->size);                  bufferevent_write(c->stdout_event, pb->data, pb->size);
         } else {          } else {
                   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;
                   }
   
                 mask = umask(S_IRWXG | S_IRWXO);                  mask = umask(S_IRWXG | S_IRWXO);
                 if (args_has(self->args, 'a'))                  if (args_has(self->args, 'a'))
                         f = fopen(path, "ab");                          f = fopen(path, "ab");

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12