summaryrefslogtreecommitdiff
path: root/src/common/command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-06-12 13:42:33 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-06-12 13:42:33 +0000
commitcd3599e6db955ec16ddc861d00efbce1fe269ab8 (patch)
treefbd5395382eee9ac3e15f693ef4d99cdbc937c47 /src/common/command.c
parentbbe20b9b301ad29dc81931163746a64272b59140 (diff)
downloadweechat-cd3599e6db955ec16ddc861d00efbce1fe269ab8.zip
Removed tests on binary when using /upgrade
Diffstat (limited to 'src/common/command.c')
-rw-r--r--src/common/command.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/common/command.c b/src/common/command.c
index e1eb6edf1..d99b6d310 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -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)