From d858aeced5580602cd1f2459e79b46b8930fdd50 Mon Sep 17 00:00:00 2001 From: Srinivas Date: Wed, 16 Jan 2019 20:04:18 -0800 Subject: [PATCH] fix root directory to current dir --- Source/Module/userInterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Module/userInterface.py b/Source/Module/userInterface.py index f687ec0..a13f1c7 100644 --- a/Source/Module/userInterface.py +++ b/Source/Module/userInterface.py @@ -10,7 +10,7 @@ import threading import Queue from PIL import Image,ImageTk -import os +import os, sys class pcapXrayGui: def __init__(self, base): @@ -75,7 +75,7 @@ def __init__(self, base): def browse_directory(self): # Reference: http://effbot.org/tkinterbook/tkinter-dialog-windows.htm - self.pcap_file.set(tkFileDialog.askopenfilename(initialdir = "/",title = "Select Packet Capture File!",filetypes = (("pcap files","*.pcap"),("pcapng files","*.pcapng")))) + self.pcap_file.set(tkFileDialog.askopenfilename(initialdir = sys.path[0],title = "Select Packet Capture File!",filetypes = (("pcap files","*.pcap"),("pcapng files","*.pcapng")))) self.filename = self.pcap_file.get().replace(".pcap","") if "/" in self.filename: self.filename = self.filename.split("/")[-1]