summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)