Wireshark-bugs: [Wireshark-bugs] [Bug 12117] New: 'prefs_register_directory_preference' returns
Date: Fri, 12 Feb 2016 14:18:32 +0000
Bug ID 12117
Summary 'prefs_register_directory_preference' returns wrong path
Product Wireshark
Version 2.1.x (Experimental)
Hardware x86
OS Windows 7
Status UNCONFIRMED
Severity Major
Priority Low
Component Qt UI
Assignee bugzilla-admin@wireshark.org
Reporter fixed-term.Tobias.Scholz@boschrexroth.de

Build Information:
Version 2.1.0(TS_QT_PS) (v2.1.0rc0-1933-geefcbc0 from master)

Copyright 1998-2016 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (32-bit) with Qt 5.5.1, with WinPcap (4_1_3), with libz 1.2.8, with
GLib 2.38.0, with SMI 0.4.8, with c-ares 1.9.1, with Lua 5.2, with GnuTLS
3.2.15, with Gcrypt 1.6.2, with MIT Kerberos, with GeoIP, with QtMultimedia,
with AirPcap.

Running on 64-bit Windows 7 Service Pack 1, build 7601, with locale C, with
WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version
1.0 branch 1_0_rel0b (20091008), with GnuTLS 3.2.15, with Gcrypt 1.6.2, with
AirPcap 4.1.0 build 1622.
Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (with SSE4.2), with 16329MB of physical
memory.


Built using Microsoft Visual C++ 12.0 build 31101

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
Hello.

In my dissector, a user has to define a network path, in which some text files
are saved. Therefore I am using the function
‘prefs_register_directory_preference( )’ to get the path to a folder.
I also searched for the difference between UNIX and WIN network path names and
noticed, that WIN uses the backslashes (e.g.: ‘D:\Development\...’ ) and UNIX
the slashes (e.g.: ‘…/Development/…’ ). 

Before using Wireshark 2.1.0 everything was fine with this functionality. The
path was correctly been given to the program, for example for my windows pc
‘D:\Development\files’ (backslashes). Since I have upgraded my patch up to
Wireshark 2.1.0, I still use the same function, but in comparison, Wireshark
now returns for the same machine ‘D:/Development/files’ (slashes). 
Even the protocol ‘MATE’ also uses the preference functionality , to define the
path to a special file. But also there, the same problem appears.

For explanation:
I am using this path, to find several different files in this folder, which are
including important information for my dissector. Therefore I add (depending on
the operating system)  \<filename> for WIN or /<filename> to open the file and
to search for the information in it. But getting the path
‘D:/Development/files’ from Wireshark I’m adding for my windows pc \<filename>,
which gives me the total path to the file ‘D:/Development/files\<filename>’.


Alexis La Goutte told me to report this to bugzilla, so I hope it will help
you.


You are receiving this mail because:
  • You are watching all bug changes.