Skip to content

Commit

Permalink
#346 ドライブをまたぐハードリンクの作成はできないのでエラー処理
Browse files Browse the repository at this point in the history
  • Loading branch information
yamahubuki committed Aug 1, 2020
1 parent b5f8ed7 commit 43ff8fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tabs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,14 @@ def MakeShortcut(self,option):
if not os.path.isabs(dest): #早退の場合は絶対に直す
dest=os.path.normpath(os.path.join(os.path.dirname(target),dest))

#ハードリンクの場合、同一ドライブ上への作成に限られる
#ネットワーク上の項目への作成はここにくる以前でブロック済み
if option["type"]=="hardLink":
if target[0]!=dest[0]: #異なるドライブへの作成
dialog(_("エラー"),_("他のドライブに対してハードリンクを作成することはできません。"))

#TODO:
#相対パスでの作成に後日対応する必要がある
#ハードリンクはドライブをまたげないのでバリデーションする
#ファイルシステムを確認し、対応してない種類のものは作れないようにバリデーションする
#作業フォルダの指定に対応する(ファイルオペレータ側の修正も必用)

Expand Down

0 comments on commit 43ff8fe

Please sign in to comment.