From d43289f07096b02c852d11179fc69e3f4ca9e7cd Mon Sep 17 00:00:00 2001 From: kochi Date: Sat, 11 Jul 2020 00:41:24 +0900 Subject: [PATCH] =?UTF-8?q?#143=20=E3=83=89=E3=83=A9=E3=82=A4=E3=83=96?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E2=87=94=E3=83=8D=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=AA=E3=82=BD=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E2=87=94=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E7=A7=BB=E5=8B=95?= =?UTF-8?q?=E3=81=8C=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tabs/NetworkResourceList.py | 1 - tabs/base.py | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tabs/NetworkResourceList.py b/tabs/NetworkResourceList.py index 9f33d6b..c015e2c 100644 --- a/tabs/NetworkResourceList.py +++ b/tabs/NetworkResourceList.py @@ -36,7 +36,6 @@ class NetworkResourceListTab(base.FalconTabBase): "EDIT_CUT", "EDIT_PAST", "EDIT_SEARCH", - "MOVE_BACKWARD", "MOVE_FORWARD_TAB", "MOVE_TOPFILE", "TOOL_DIRCALC", diff --git a/tabs/base.py b/tabs/base.py index 16b1112..f2e59ee 100644 --- a/tabs/base.py +++ b/tabs/base.py @@ -10,6 +10,7 @@ import json import logging import os +import re import wx import browsableObjects @@ -626,20 +627,30 @@ def GoForward(self,stream,admin=False): def GoBackward(self): """内包しているフォルダ/ドライブ一覧へ移動する。""" self.StopSound() - if len(self.listObject.rootDirectory)<=3: #ドライブリストへ + if len(self.listObject.rootDirectory)<3: #ドライブリストへ target="" cursorTarget=self.listObject.rootDirectory[0] else: root=self.listObject.rootDirectory while(True): - if len(self.listObject.rootDirectory)<=3: #ドライブリストへ + if len(self.listObject.rootDirectory)<3: #ドライブリストへ target="" cursorTarget=self.listObject.rootDirectory[0] break #end 下がっていってドライブリスト spl=os.path.split(root) target=spl[0] - if os.path.isdir(target): + if(target==root and root[0:2]=="\\\\"): + #\\hoge\\fuga の階層のみ、os.path.split()しても結果が変わらない + target=re.sub("(\\\\\\\\[^\\\\]+).+","\\1",target) + cursorTarget=re.sub("\\\\\\\\[^\\\\]+(.+)","\\1",target) + result=self.Move(target,cursorTarget) + if(type(result)!=int): + return result + else: + cursorTarget=target + target="" + elif os.path.isdir(target): cursorTarget=spl[1] break #end 移動先が存在するので抜ける