[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Weechat-dev] [patch #6980] script_action_install / script_search_by_ful
From: |
bazerka |
Subject: |
[Weechat-dev] [patch #6980] script_action_install / script_search_by_full_name basename bug under *BSD/OSX |
Date: |
Mon, 16 Nov 2009 00:25:22 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) |
URL:
<http://savannah.nongnu.org/patch/?6980>
Summary: script_action_install / script_search_by_full_name
basename bug under *BSD/OSX
Project: WeeChat
Submitted by: bazerka
Submitted on: Mon 16 Nov 2009 12:25:20 AM GMT
Category: script plugin
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
IRC nick: Bazerka
_______________________________________________________
Details:
The behaviour of basename(3) in *BSD/OSX differs to that of Linux/Solaris, in
that its internal storage buffer is kept across multiple calls to basename(3).
As a result, you must copy the string out of the buffer each time prior to
further basename(3) calls.
Due to this behaviour and how WeeChat currently uses basename, under
*BSD/OSX, script_search_by_full_name will immediately match the first script
in the loaded scripts list. The end effect of this is that /weeget install
<script> will cause the first script to be unloaded from memory and its file
overwritten on disk.
For example:
00:22:24 | WeeChat 0.3.0 [compiled on Nov 16 2009 00:21:53]
00:22:24 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00:22:24 | python scripts loaded: autojoin_on_invite, bufsave, uname, weeget
00:22:24 | Plugins loaded: alias, aspell, fifo, irc, logger, perl, python,
xfer
00:22:38 | weeget: downloading list of scripts...
00:22:38 | weeget: scripts downloaded
00:22:39 | weeget: downloading "shell.py"...
00:22:39 | python: unloading script "autojoin_on_invite"
00:22:39 | python: script removed:
/home/bazerka/.weechat/python/autoload/autojoin_on_invite.py
00:22:39 | python: script removed:
/home/bazerka/.weechat/python/autojoin_on_invite.py
00:22:39 | python: loading script
"/home/bazerka/.weechat/python/autojoin_on_invite.py"
00:22:39 | python: registered script "shell", version 0.4 (Run shell commands
in WeeChat)
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 16 Nov 2009 12:25:20 AM GMT Name: script.c.diff Size: 2kB By:
bazerka
Patch and test code/results to demonstrate behaviour
<http://savannah.nongnu.org/patch/download.php?file_id=19061>
-------------------------------------------------------
Date: Mon 16 Nov 2009 12:25:20 AM GMT Name: weechat-basename.txt Size: 4kB
By: bazerka
Patch and test code/results to demonstrate behaviour
<http://savannah.nongnu.org/patch/download.php?file_id=19062>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6980>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [patch #6980] script_action_install / script_search_by_full_name basename bug under *BSD/OSX,
bazerka <=