exported / paimei

Automatically exported from code.google.com/p/paimei
GNU General Public License v2.0
1 stars 0 forks source link

It fails to get the module_name from the PIDA file path in MacOSX #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use the process-stalk module in MacOSX.

What version of the product are you using? On what operating system?
Most recent check-out. MacOSX.

Please provide any additional information below.

PIDAModulesListCtrl.py - Line 73:

module_name = path[path.rfind("\\")+1:path.rfind(".pida")].lower()

This code fails to get the module name from the PIDA filepath in MacOSX. 
This provokes that the process name that is going to stalk doesn't match with 
the module name from the PIDA file loaded.

It may not be the best solution, but something like this will be enough:

if path.rfind("\\")>=0:
    #windows
    module_name = path[path.rfind("\\")+1:path.rfind(".pida")].lower() 
else:
    #macosx
    module_name = path[path.rfind("/")+1:path.rfind(".pida")].lower()

Original issue reported on code.google.com by robg...@gmail.com on 19 Jul 2010 at 8:24

GoogleCodeExporter commented 9 years ago
or maybe this code:

module_name = os.path.splitext(os.path.split(path)[1])[0]

Original comment by robg...@gmail.com on 19 Jul 2010 at 8:34