def request_focus_into(self, path): if path == "": if running_on_windows(): # list of drives, can't cd self.focus_into(path) return else: path = "/" if not os.path.isdir(path): return proxy = get_runner().get_backend_proxy() if ( proxy and proxy.uses_local_filesystem() and proxy.get_cwd() != path and get_runner().is_waiting_toplevel_command() ): get_shell().submit_magic_command(construct_cd_command(normpath_with_actual_case(path))) else: # it's OK, if it's already focused into this directory # focus again to refresh self.focus_into(path) get_workbench().set_local_cwd(path)
def request_focus_into(self, path): if not path: if running_on_windows(): # list of drives, can't cd return self.focus_into(path) else: path = "/" if not os.path.isdir(path): return proxy = get_runner().get_backend_proxy() if (proxy and proxy.uses_local_filesystem() and get_workbench().get_local_cwd() != path and get_runner().is_waiting_toplevel_command()): get_shell().submit_magic_command(construct_cd_command(path)) else: # change directly without notifying (non-existing, busy or remote) back-end get_workbench().set_local_cwd(path)
def request_focus_into(self, path): proxy = get_runner().get_backend_proxy() print("requesting", path) if proxy: assert proxy.has_own_filesystem() if not get_runner().is_waiting_toplevel_command(): messagebox.showerror( "Error", "Can't change directories when device is busy.\n" + "Wait until current command completes and try again.") elif not proxy.supports_directories(): print("nodir") assert not path self.focus_into(path) get_workbench().set_remote_cwd(path) elif get_workbench().get_remote_cwd() == path: print("issame") self.focus_into(path) get_workbench().set_remote_cwd(path) else: print("notsame") get_shell().submit_magic_command(construct_cd_command(path))