mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 06:16:40 +02:00
Remove *.upgrade files in weechat dir after /upgrade
This commit is contained in:
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1856,6 +1856,10 @@ msgstr "GB"
|
||||
msgid "byte"
|
||||
msgstr "bajtů"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr "%s nemohu vytvořit soubor \"%s\"\n"
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
|
||||
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1870,6 +1870,10 @@ msgstr "GB"
|
||||
msgid "byte"
|
||||
msgstr "Bytes"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr "Aktualisiere WeeChat...\n"
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
|
||||
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1849,6 +1849,10 @@ msgstr ""
|
||||
msgid "byte"
|
||||
msgstr "bytes"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr "Actualizando Weechat...\n"
|
||||
|
||||
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"PO-Revision-Date: 2009-04-09 12:58+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: 2009-04-15 23:39+0200\n"
|
||||
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -1958,6 +1958,10 @@ msgstr "Go"
|
||||
msgid "byte"
|
||||
msgstr "octet"
|
||||
|
||||
#, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr "debug: suppression du fichier: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr "%sErreur de mise à jour de WeeChat avec le fichier \"%s\":"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1881,6 +1881,10 @@ msgstr "GB"
|
||||
msgid "byte"
|
||||
msgstr "byte"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr "WeeChat frissítése...\n"
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.2.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1883,6 +1883,10 @@ msgstr "ГБ"
|
||||
msgid "byte"
|
||||
msgstr "байтов"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr " IRC(%s)\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr "Обновляю WeeChat...\n"
|
||||
|
||||
+5
-1
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2009-04-09 12:57+0200\n"
|
||||
"POT-Creation-Date: 2009-04-15 23:39+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -1592,6 +1592,10 @@ msgstr ""
|
||||
msgid "byte"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "debug: removing file: %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sError upgrading WeeChat with file \"%s\":"
|
||||
msgstr ""
|
||||
|
||||
@@ -24,12 +24,14 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-upgrade.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-util.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../gui/gui-history.h"
|
||||
@@ -562,3 +564,33 @@ upgrade_weechat_load ()
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* upgrade_weechat_remove_file_cb: callback called to remove a .upgrade file
|
||||
*/
|
||||
|
||||
void
|
||||
upgrade_weechat_remove_file_cb (void *data, const char *filename)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
|
||||
if (string_match (filename, "*.upgrade", 1))
|
||||
{
|
||||
if (weechat_debug_core >= 2)
|
||||
gui_chat_printf (NULL, _("debug: removing file: %s"), filename);
|
||||
unlink (filename);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* upgrade_weechat_remove_files: remove *.upgrade files after upgrade
|
||||
*/
|
||||
|
||||
void
|
||||
upgrade_weechat_remove_files ()
|
||||
{
|
||||
util_exec_on_files (weechat_home,
|
||||
NULL,
|
||||
&upgrade_weechat_remove_file_cb);
|
||||
}
|
||||
|
||||
@@ -38,5 +38,6 @@ enum t_upgrade_weechat_type
|
||||
|
||||
int upgrade_weechat_save ();
|
||||
int upgrade_weechat_load ();
|
||||
void upgrade_weechat_remove_files ();
|
||||
|
||||
#endif /* wee-upgrade.h */
|
||||
|
||||
@@ -410,6 +410,8 @@ main (int argc, char *argv[])
|
||||
argc, argv);
|
||||
command_startup (1); /* command executed after plugins */
|
||||
gui_layout_window_apply (gui_layout_windows, -1); /* apply saved layout */
|
||||
if (weechat_upgrading)
|
||||
upgrade_weechat_remove_files ();/* remove .upgrade files */
|
||||
weechat_upgrading = 0;
|
||||
|
||||
gui_main_loop (); /* WeeChat main loop */
|
||||
|
||||
Reference in New Issue
Block a user