1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

Removed tests on binary when using /upgrade

This commit is contained in:
Sebastien Helleu
2007-06-12 13:42:33 +00:00
parent bbe20b9b30
commit cd3599e6db
18 changed files with 3284 additions and 3350 deletions
+1 -2
View File
@@ -8,8 +8,7 @@ Version 0.2.6 (under dev!):
* fixed log file when channel name contains "/" (bug #20072)
* command /away allowed when not connected to server (internally stored
and AWAY command is sent when connecting to server) (task #7003)
* added argument for /upgrade command (path to binary), check that
binary file is found and has execution permissions before upgrading
* added argument for /upgrade command (path to binary)
* fixed bug with /topic when channel not open and topic not defined
(bug #20141)
* added hotlist sort with new option "look_hotlist_sort" (task #5870)
+235 -236
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+236 -238
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+229 -236
View File
File diff suppressed because it is too large Load Diff
+1 -19
View File
@@ -24,8 +24,6 @@
#include "config.h"
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -3834,10 +3832,9 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
int argc, char **argv)
{
t_irc_server *ptr_server;
int filename_length, rc;
int filename_length;
char *filename, *ptr_binary;
char *exec_args[7] = { NULL, "-a", "--dir", NULL, "--session", NULL, NULL };
struct stat stat_buf;
/* make C compiler happy */
(void) server;
@@ -3879,21 +3876,6 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
}
}
/* check if weechat binary is here and executable by user */
rc = stat (ptr_binary, &stat_buf);
if ((rc != 0) || (!S_ISREG(stat_buf.st_mode))
|| ((!(stat_buf.st_mode & S_IXUSR)) && (!(stat_buf.st_mode & S_IXGRP))
&& (!(stat_buf.st_mode & S_IXOTH))))
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
gui_printf_nolog (NULL,
_("%s can't upgrade: WeeChat binary \"%s\" "
"is not found or does not have execute "
"permissions\n"),
WEECHAT_ERROR, ptr_binary);
return -1;
}
filename_length = strlen (weechat_home) + strlen (WEECHAT_SESSION_NAME) + 2;
filename = (char *) malloc (filename_length * sizeof (char));
if (!filename)
+1 -2
View File
@@ -8,8 +8,7 @@ Version 0.2.6 (under dev!):
* fixed log file when channel name contains "/" (bug #20072)
* command /away allowed when not connected to server (internally stored
and AWAY command is sent when connecting to server) (task #7003)
* added argument for /upgrade command (path to binary), check that
binary file is found and has execution permissions before upgrading
* added argument for /upgrade command (path to binary)
* fixed bug with /topic when channel not open and topic not defined
(bug #20141)
* added hotlist sort with new option "look_hotlist_sort" (task #5870)
+235 -236
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+236 -238
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+235 -236
View File
File diff suppressed because it is too large Load Diff
+229 -236
View File
File diff suppressed because it is too large Load Diff
+1 -19
View File
@@ -24,8 +24,6 @@
#include "config.h"
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -3834,10 +3832,9 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
int argc, char **argv)
{
t_irc_server *ptr_server;
int filename_length, rc;
int filename_length;
char *filename, *ptr_binary;
char *exec_args[7] = { NULL, "-a", "--dir", NULL, "--session", NULL, NULL };
struct stat stat_buf;
/* make C compiler happy */
(void) server;
@@ -3879,21 +3876,6 @@ weechat_cmd_upgrade (t_irc_server *server, t_irc_channel *channel,
}
}
/* check if weechat binary is here and executable by user */
rc = stat (ptr_binary, &stat_buf);
if ((rc != 0) || (!S_ISREG(stat_buf.st_mode))
|| ((!(stat_buf.st_mode & S_IXUSR)) && (!(stat_buf.st_mode & S_IXGRP))
&& (!(stat_buf.st_mode & S_IXOTH))))
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
gui_printf_nolog (NULL,
_("%s can't upgrade: WeeChat binary \"%s\" "
"is not found or does not have execute "
"permissions\n"),
WEECHAT_ERROR, ptr_binary);
return -1;
}
filename_length = strlen (weechat_home) + strlen (WEECHAT_SESSION_NAME) + 2;
filename = (char *) malloc (filename_length * sizeof (char));
if (!filename)