Skip to content

Commit

Permalink
Use qemu.root() instead of a hardcoded path (Gallopsled#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeSeekAfterKnowledge authored Jun 6, 2020
1 parent 5b9a42a commit 1cd9874
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pwndbg/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def get_file(path):
The local path to the file
"""
local_path = path

if pwndbg.qemu.root():
return os.path.join(pwndbg.qemu.binfmt_root, path)
qemu_root = pwndbg.qemu.root()
if qemu_root:
return os.path.join(qemu_root, path)
elif pwndbg.remote.is_remote() and not pwndbg.qemu.is_qemu():
local_path = tempfile.mktemp(dir=pwndbg.symbol.remote_files_dir)
error = None
Expand Down

0 comments on commit 1cd9874

Please sign in to comment.