Wireshark mailing list archives
2.1.0 - 'prefs_register_directory_preference' returns wrong path?
From: "FIXED-TERM Scholz Tobias (DC-IA/EAI)" <fixed-term.Tobias.Scholz () boschrexroth de>
Date: Fri, 12 Feb 2016 08:35:54 +0000
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>'. Does someone have the same problems and a solution for it or is there anything I forgot due to the new version of Wireshark? T. Scholz
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- 2.1.0 - 'prefs_register_directory_preference' returns wrong path? FIXED-TERM Scholz Tobias (DC-IA/EAI) (Feb 12)
- Re: 2.1.0 - 'prefs_register_directory_preference' returns wrong path? Alexis La Goutte (Feb 12)