mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 04:14:57 +08:00
Simplify the way in which path prompts keep state
In the past, we kept the last path the user specified for a number of different path types to pre-seed the path prompt. Now, we no longer distinguish between types, and pre-seed with the last used directory regardless.
This commit is contained in:
@@ -193,7 +193,6 @@ def raw_format_flow(f, focus, extended, padding):
|
||||
def save_data(path, data, master, state):
|
||||
if not path:
|
||||
return
|
||||
state.last_saveload = path
|
||||
path = os.path.expanduser(path)
|
||||
try:
|
||||
with file(path, "wb") as f:
|
||||
@@ -205,7 +204,6 @@ def save_data(path, data, master, state):
|
||||
def ask_save_path(prompt, data, master, state):
|
||||
signals.status_prompt_path.send(
|
||||
prompt = prompt,
|
||||
text = state.last_saveload,
|
||||
callback = save_data,
|
||||
args = (data, master, state)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user