• R/O
  • SSH
  • HTTPS

scfiler: Commit


Commit MetaInfo

Revision95 (tree)
Time2009-05-31 18:27:45
Authoryuki_sc

Log Message

コピー/移動のパスがまずくて失敗するケースを修正。

Change Summary

Incremental Difference

--- SCFiler2/moveToAnotherFileView.cs (revision 94)
+++ SCFiler2/moveToAnotherFileView.cs (revision 95)
@@ -28,7 +28,14 @@
2828 List<IFilerItem> list = activeView.SelectedFilerItems;
2929 string destFolder = inactiveView.CurrentPath;
3030
31- MoveJob job = new MoveJob(new Folder(destFolder), list);
31+ MoveJob job;
32+ try {
33+ job = new MoveJob(new Folder(destFolder), list);
34+ } catch (InvalidPreConditionJobException ex) {
35+ SCFiler2System.ShowDialogMessage(ex.Message);
36+ return;
37+ }
38+
3239 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
3340 JobManager.Instance.AddJob(job);
3441 } else {
--- SCFiler2/CopyJob.cs (revision 94)
+++ SCFiler2/CopyJob.cs (revision 95)
@@ -6,7 +6,7 @@
66 namespace SCFiler2.FileSystem {
77 /// <summary>
88 /// コピーを実行するジョブ
9- /// あらかじめ登録しておいて、Execute()を呼び出されたときに
9+ /// あらかじめ登録しておいて、Execute()を呼び出されたときに実行される
1010 /// </summary>
1111 class CopyJob : Job {
1212 private IFolder destination;
@@ -15,10 +15,19 @@
1515
1616 /// <summary>
1717 /// コンストラクタ
18+ /// コピー先が良くないときは例外が発生する
1819 /// </summary>
1920 /// <param name="destination">コピー先のフォルダ</param>
2021 /// <param name="source">コピー元のファイル/フォルダのリスト</param>
2122 public CopyJob(IFolder destination, List<IFilerItem> source) : base("コピーしています") {
23+ foreach (IFilerItem item in source) {
24+ if (item.Path == destination.FullName) {
25+ throw new InvalidPreConditionJobException("コピーできません。コピー元とコピー先が同じです。");
26+ } else if (item.Type == ItemType.Folder && destination.FullName.StartsWith(item.FullName, StringComparison.OrdinalIgnoreCase)) {
27+ throw new InvalidPreConditionJobException("コピーできません。コピー先はコピー元に含まれます。");
28+ }
29+ }
30+
2231 this.destination = destination;
2332 this.source = new List<IFilerItem>(source);
2433 }
--- SCFiler2/FileView.cs (revision 94)
+++ SCFiler2/FileView.cs (revision 95)
@@ -895,7 +895,14 @@
895895 private void CopyDroppedFilesEventHander(Object sender, EventArgs e) {
896896 MenuItem item = (MenuItem)sender;
897897 string[] files = (string[])item.Tag;
898- CopyJob job = new CopyJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
898+
899+ CopyJob job;
900+ try {
901+ job = new CopyJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
902+ } catch (InvalidPreConditionJobException ex) {
903+ SCFiler2System.ShowDialogMessage(ex.Message);
904+ return;
905+ }
899906 JobManager.Instance.ExecuteJobNow(job);
900907 UpdateView();
901908 }
@@ -909,7 +916,13 @@
909916 private void MoveDroppedFilesEventHander(Object sender, EventArgs e) {
910917 MenuItem item = (MenuItem)sender;
911918 string[] files = (string[])item.Tag;
912- MoveJob job = new MoveJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
919+ MoveJob job;
920+ try {
921+ job = new MoveJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
922+ } catch (InvalidPreConditionJobException ex) {
923+ SCFiler2System.ShowDialogMessage(ex.Message);
924+ return;
925+ }
913926 JobManager.Instance.ExecuteJobNow(job);
914927 UpdateView();
915928 }
@@ -928,11 +941,23 @@
928941 menu.Show(this, PointToClient(new Point(e.X, e.Y)));
929942 } else if (((e.KeyState & 8) == 8) && ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy)) {
930943 //Ctrlが押されていたらコピー (8はCtrlを表す)
931- CopyJob job = new CopyJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
944+ CopyJob job;
945+ try {
946+ job = new CopyJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
947+ } catch (InvalidPreConditionJobException ex) {
948+ SCFiler2System.ShowDialogMessage(ex.Message);
949+ return;
950+ }
932951 JobManager.Instance.ExecuteJobNow(job);
933952 UpdateView();
934953 } else if ((e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) {
935- MoveJob job = new MoveJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
954+ MoveJob job;
955+ try {
956+ job = new MoveJob(new Folder(currentPath), FilerItem.GetFileListFromStringArray(files));
957+ } catch (InvalidPreConditionJobException ex) {
958+ SCFiler2System.ShowDialogMessage(ex.Message);
959+ return;
960+ }
936961 JobManager.Instance.ExecuteJobNow(job);
937962 UpdateView();
938963 }
--- SCFiler2/MoveDialog.cs (revision 94)
+++ SCFiler2/MoveDialog.cs (revision 95)
@@ -49,7 +49,14 @@
4949 SCFiler2System.ShowTempMessage("反対のビューがドライブ一覧を表示しているのでコマンドを実行できません");
5050 return;
5151 }
52- MoveJob job = new MoveJob(new Folder(inactiveView.CurrentPath), activeView.SelectedFilerItems);
52+ MoveJob job;
53+ try {
54+ job = new MoveJob(new Folder(inactiveView.CurrentPath), activeView.SelectedFilerItems);
55+ } catch (InvalidPreConditionJobException ex) {
56+ SCFiler2System.ShowDialogMessage(ex.Message);
57+ return;
58+ }
59+
5360 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
5461 JobManager.Instance.AddJob(job);
5562 } else {
@@ -73,7 +80,14 @@
7380 JumpFolderDialog jumpDialog = new JumpFolderDialog();
7481 DialogResult jumpDialogResult = jumpDialog.ShowDialog();
7582 if (jumpDialogResult == DialogResult.OK) {
76- MoveJob moveJob = new MoveJob(new Folder(jumpDialog.SelectedJumpFolder.Folder.FullName), activeView.SelectedFilerItems);
83+ MoveJob moveJob;
84+ try {
85+ moveJob = new MoveJob(new Folder(jumpDialog.SelectedJumpFolder.Folder.FullName), activeView.SelectedFilerItems);
86+ } catch (InvalidPreConditionJobException ex) {
87+ SCFiler2System.ShowDialogMessage(ex.Message);
88+ return;
89+ }
90+
7791 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
7892 JobManager.Instance.AddJob(moveJob);
7993 } else {
@@ -106,7 +120,14 @@
106120 }
107121 }
108122
109- MoveJob moveJob2 = new MoveJob(new Folder(selectDialog.SelectedItem.FullName), activeView.SelectedFilerItems);
123+ MoveJob moveJob2;
124+ try {
125+ moveJob2 = new MoveJob(new Folder(selectDialog.SelectedItem.FullName), activeView.SelectedFilerItems);
126+ } catch (InvalidPreConditionJobException ex) {
127+ SCFiler2System.ShowDialogMessage(ex.Message);
128+ return;
129+ }
130+
110131 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
111132 JobManager.Instance.AddJob(moveJob2);
112133 } else {
--- SCFiler2/CopyDialog.cs (revision 94)
+++ SCFiler2/CopyDialog.cs (revision 95)
@@ -57,7 +57,14 @@
5757
5858 List<IFilerItem> list = activeView.SelectedFilerItems;
5959 string destFolder = inactiveView.CurrentPath;
60- CopyJob copyJob = new CopyJob(new Folder(destFolder), list);
60+ CopyJob copyJob;
61+ try {
62+ copyJob = new CopyJob(new Folder(destFolder), list);
63+ } catch (InvalidPreConditionJobException e) {
64+ SCFiler2System.ShowDialogMessage(e.Message);
65+ return;
66+ }
67+
6168 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
6269 JobManager.Instance.AddJob(copyJob);
6370 } else {
@@ -70,17 +77,28 @@
7077 inactiveView.SelectMode = SelectMode.Normal;
7178 inactiveView.ViewMode = ViewMode.Normal;
7279 break;
80+
7381 case OperationTargetDialog.Target.Clipboard:
7482 ClipboardManager.SendToClipboard(ClipboardManager.EffectType.Copy, activeView.SelectedFilerItems);
7583 SCFiler2System.ShowTempMessage("選択アイテムをクリップボードにコピーしました");
7684 ViewInterfaces.CheckUpdateAllView();
7785 break;
86+
7887 case OperationTargetDialog.Target.JumpFolder:
7988 JumpFolderDialog jumpDialog = new JumpFolderDialog();
8089 DialogResult jumpDialogResult = jumpDialog.ShowDialog();
8190 if (jumpDialogResult == DialogResult.OK) {
8291 IJumpFolder jumpFolder = jumpDialog.SelectedJumpFolder;
83- CopyJob copyJob2 = new CopyJob(jumpFolder.Folder, activeView.SelectedFilerItems);
92+
93+ CopyJob copyJob2;
94+ try {
95+ copyJob2 = new CopyJob(jumpFolder.Folder, activeView.SelectedFilerItems);
96+ } catch (InvalidPreConditionJobException e) {
97+ SCFiler2System.ShowDialogMessage(e.Message);
98+ return;
99+ }
100+
101+
84102 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
85103 JobManager.Instance.AddJob(copyJob2);
86104 } else {
@@ -106,7 +124,16 @@
106124 selectDialog.DialogTitle = "コピー先を選択してください";
107125 DialogResult selectResult = selectDialog.ShowDialog();
108126 if (selectResult == DialogResult.OK) {
109- CopyJob copyJob3 = new CopyJob(new Folder(selectDialog.SelectedItem.FullName), activeView.SelectedFilerItems);
127+
128+ CopyJob copyJob3;
129+ try {
130+ copyJob3 = new CopyJob(new Folder(selectDialog.SelectedItem.FullName), activeView.SelectedFilerItems);
131+ } catch (InvalidPreConditionJobException e) {
132+ SCFiler2System.ShowDialogMessage(e.Message);
133+ return;
134+ }
135+
136+
110137 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
111138 JobManager.Instance.AddJob(copyJob3);
112139 } else {
--- SCFiler2/MainForm.cs (revision 94)
+++ SCFiler2/MainForm.cs (revision 95)
@@ -660,6 +660,18 @@
660660 ActionManager.CreateAction(ActionManager.ActionID.SwitchNarrowDownMode).Execute();
661661 }
662662
663+ private void 表示PToolStripMenuItem_Click(object sender, EventArgs e) {
663664
665+ }
666+
667+ private void サムネイル表示切り替えTToolStripMenuItem_Click(object sender, EventArgs e) {
668+ ActionManager.CreateAction(ActionManager.ActionID.ThumbnailMode).Execute();
669+ }
670+
671+ private void プレビューモード切り替えToolStripMenuItem_Click(object sender, EventArgs e) {
672+ ActionManager.CreateAction(ActionManager.ActionID.PreviewMode).Execute();
673+ }
674+
675+
664676 }
665677 }
\ No newline at end of file
--- SCFiler2/About.Designer.cs (revision 94)
+++ SCFiler2/About.Designer.cs (revision 95)
@@ -35,7 +35,7 @@
3535 this.appName.Name = "appName";
3636 this.appName.Size = new System.Drawing.Size(147, 12);
3737 this.appName.TabIndex = 0;
38- this.appName.Text = "SCFiler2 Alpha version 0.40";
38+ this.appName.Text = "SCFiler2 Alpha version 0.41";
3939 this.appName.Click += new System.EventHandler(this.appName_Click);
4040 //
4141 // okButton
--- SCFiler2/CopyToAnotherFileVIew.cs (revision 94)
+++ SCFiler2/CopyToAnotherFileVIew.cs (revision 95)
@@ -28,7 +28,14 @@
2828 List<IFilerItem> list = activeView.SelectedFilerItems;
2929 string destFolder = inactiveView.CurrentPath;
3030
31- CopyJob job = new CopyJob(new Folder(destFolder), list);
31+ CopyJob job;
32+ try {
33+ job = new CopyJob(new Folder(destFolder), list);
34+ } catch (InvalidPreConditionJobException e) {
35+ SCFiler2System.ShowDialogMessage(e.Message);
36+ return;
37+ }
38+
3239 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
3340 JobManager.Instance.AddJob(job);
3441 } else {
--- SCFiler2/VirtualListViewItem.cs (revision 94)
+++ SCFiler2/VirtualListViewItem.cs (revision 95)
@@ -211,5 +211,8 @@
211211 }
212212 }
213213
214+ public override int GetHashCode() {
215+ return this.FilerItem.FullName.GetHashCode();
216+ }
214217 }
215218 }
--- SCFiler2/FilerItemSelectDialog.cs (revision 94)
+++ SCFiler2/FilerItemSelectDialog.cs (revision 95)
@@ -52,7 +52,11 @@
5252 }
5353
5454 private void okButton_Click(object sender, EventArgs e) {
55- this.DialogResult = DialogResult.OK;
55+ if (this.FilerItemListView.SelectedItems.Count == 0) {
56+ this.DialogResult = DialogResult.Cancel;
57+ } else {
58+ this.DialogResult = DialogResult.OK;
59+ }
5660 this.Close();
5761 }
5862 }
--- SCFiler2/MoveJob.cs (revision 94)
+++ SCFiler2/MoveJob.cs (revision 95)
@@ -9,13 +9,22 @@
99 /// あらかじめ登録しておいてExecute()を呼び出されたタイミングで実行する
1010 /// </summary>
1111 class MoveJob : Job {
12- private Folder destination;
12+ private IFolder destination;
1313 private List<IFilerItem> source;
1414 private RepeatOverwriteState state = new RepeatOverwriteState();
1515
16- public MoveJob(Folder destination, List<IFilerItem> source) : base("移動しています") {
16+ public MoveJob(IFolder destination, List<IFilerItem> source) : base("移動しています") {
17+ foreach (IFilerItem item in source) {
18+ if (item.Path == destination.FullName) {
19+ throw new InvalidPreConditionJobException("移動できません。移動元と移動先が同じです。");
20+ } else if (item.Type == ItemType.Folder && destination.FullName.StartsWith(item.FullName, StringComparison.OrdinalIgnoreCase)) {
21+ throw new InvalidPreConditionJobException("移動できません。移動先は移動元に含まれます。");
22+ }
23+ }
24+
1725 this.destination = destination;
1826 this.source = new List<IFilerItem>(source);
27+
1928 }
2029
2130 /// <summary>
@@ -25,7 +34,7 @@
2534 destination.Refresh(); //受け取った情報は、受け取ってから処理するまでに変更されている可能性があるので、Refreshする
2635
2736 //移動できない条件をチェック
28- foreach (FilerItem item in source) {
37+ foreach (IFilerItem item in source) {
2938 if (destination.FullName.StartsWith(item.FullName)) {
3039 SCFiler2System.ShowHistoryMessage("[error]:"+ item.FullName +"をそれ自身のサブフォルダ" + destination.FullName + "に移動できません");
3140 return;
@@ -38,10 +47,10 @@
3847 bool result = false;
3948 switch (item.Type) {
4049 case ItemType.File:
41- result = MoveFile(destination, (File)item);
50+ result = MoveFile(destination, (IFile)item);
4251 break;
4352 case ItemType.Folder:
44- result = MoveFolder(destination, (Folder)item);
53+ result = MoveFolder(destination, (IFolder)item);
4554 break;
4655 case ItemType.Other:
4756 SCFiler2System.ShowHistoryMessage(item.FullName + "は移動できません");
@@ -63,7 +72,7 @@
6372 /// <param name="destinationPath">移動先のフォルダ</param>
6473 /// <param name="sourcePath">移動させるフォルダ</param>
6574 /// <returns>移動を実施したかどうか</returns>
66- private bool MoveFolder(Folder destinationFolder, Folder sourceFolder) {
75+ private bool MoveFolder(IFolder destinationFolder, IFolder sourceFolder) {
6776 bool result = false;
6877
6978 //キャンセルされたときは戻る
@@ -106,7 +115,7 @@
106115 /// <param name="destinationPath">移動先のフォルダ</param>
107116 /// <param name="sourceFile">移動元のファイル</param>
108117 /// <returns>移動を実施したかどうか</returns>
109- private bool MoveFile(Folder destinationFolder, File sourceFile) {
118+ private bool MoveFile(IFolder destinationFolder, IFile sourceFile) {
110119 //キャンセルされたときは戻る
111120 if (IsCancelRequired) {
112121 return false;
--- SCFiler2/MainForm.Designer.cs (revision 94)
+++ SCFiler2/MainForm.Designer.cs (revision 95)
@@ -30,6 +30,7 @@
3030 this.検索SToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
3131 this.インクリメンタルサーチIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
3232 this.migemoサーチMToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
33+ this.絞り込みNToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
3334 this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
3435 this.全てを選択AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
3536 this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
@@ -80,6 +81,9 @@
8081 this.Level3_History2_SplitContainer = new System.Windows.Forms.SplitContainer();
8182 this.driveToolbar = new System.Windows.Forms.ToolStrip();
8283 this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
84+ this.表示PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
85+ this.サムネイル表示切り替えTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
86+ this.プレビューモード切り替えToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
8387 this.leftFileView = new SCFiler2.FileView();
8488 this.rightFileView = new SCFiler2.FileView();
8589 this.folderHistory = new SCFiler2.HistoryView();
@@ -86,7 +90,6 @@
8690 this.fileHistory1 = new SCFiler2.HistoryView();
8791 this.clipboardView = new SCFiler2.ClipboardView();
8892 this.fileHistory2 = new SCFiler2.HistoryView();
89- this.絞り込みNToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
9093 this.menuStrip.SuspendLayout();
9194 this.statusStrip.SuspendLayout();
9295 this.Level1_SplitContainer.Panel1.SuspendLayout();
@@ -112,6 +115,7 @@
112115 this.ファイルFToolStripMenuItem,
113116 this.編集EToolStripMenuItem,
114117 this.フォルダDToolStripMenuItem,
118+ this.表示PToolStripMenuItem,
115119 this.ツールTToolStripMenuItem});
116120 this.menuStrip.Location = new System.Drawing.Point(0, 0);
117121 this.menuStrip.Name = "menuStrip";
@@ -155,6 +159,13 @@
155159 this.migemoサーチMToolStripMenuItem.Text = "Migemoサーチ(&M)";
156160 this.migemoサーチMToolStripMenuItem.Click += new System.EventHandler(this.migemoサーチMToolStripMenuItem_Click);
157161 //
162+ // 絞り込みNToolStripMenuItem
163+ //
164+ this.絞り込みNToolStripMenuItem.Name = "絞り込みNToolStripMenuItem";
165+ this.絞り込みNToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
166+ this.絞り込みNToolStripMenuItem.Text = "絞り込み(&N)";
167+ this.絞り込みNToolStripMenuItem.Click += new System.EventHandler(this.絞り込みNToolStripMenuItem_Click);
168+ //
158169 // toolStripMenuItem2
159170 //
160171 this.toolStripMenuItem2.Name = "toolStripMenuItem2";
@@ -603,6 +614,30 @@
603614 this.notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseClick);
604615 this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
605616 //
617+ // 表示PToolStripMenuItem
618+ //
619+ this.表示PToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
620+ this.サムネイル表示切り替えTToolStripMenuItem,
621+ this.プレビューモード切り替えToolStripMenuItem});
622+ this.表示PToolStripMenuItem.Name = "表示PToolStripMenuItem";
623+ this.表示PToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
624+ this.表示PToolStripMenuItem.Text = "表示(&V)";
625+ this.表示PToolStripMenuItem.Click += new System.EventHandler(this.表示PToolStripMenuItem_Click);
626+ //
627+ // サムネイル表示切り替えTToolStripMenuItem
628+ //
629+ this.サムネイル表示切り替えTToolStripMenuItem.Name = "サムネイル表示切り替えTToolStripMenuItem";
630+ this.サムネイル表示切り替えTToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
631+ this.サムネイル表示切り替えTToolStripMenuItem.Text = "サムネイル表示切り替え(&T)";
632+ this.サムネイル表示切り替えTToolStripMenuItem.Click += new System.EventHandler(this.サムネイル表示切り替えTToolStripMenuItem_Click);
633+ //
634+ // プレビューモード切り替えToolStripMenuItem
635+ //
636+ this.プレビューモード切り替えToolStripMenuItem.Name = "プレビューモード切り替えToolStripMenuItem";
637+ this.プレビューモード切り替えToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
638+ this.プレビューモード切り替えToolStripMenuItem.Text = "プレビューモード切り替え(&P)";
639+ this.プレビューモード切り替えToolStripMenuItem.Click += new System.EventHandler(this.プレビューモード切り替えToolStripMenuItem_Click);
640+ //
606641 // leftFileView
607642 //
608643 this.leftFileView.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -654,13 +689,6 @@
654689 this.fileHistory2.Size = new System.Drawing.Size(51, 69);
655690 this.fileHistory2.TabIndex = 0;
656691 //
657- // 絞り込みNToolStripMenuItem
658- //
659- this.絞り込みNToolStripMenuItem.Name = "絞り込みNToolStripMenuItem";
660- this.絞り込みNToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
661- this.絞り込みNToolStripMenuItem.Text = "絞り込み(&N)";
662- this.絞り込みNToolStripMenuItem.Click += new System.EventHandler(this.絞り込みNToolStripMenuItem_Click);
663- //
664692 // MainForm
665693 //
666694 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -776,6 +804,9 @@
776804 private System.Windows.Forms.ToolStripMenuItem 現在の表示状態を一時保存TToolStripMenuItem;
777805 private System.Windows.Forms.ToolStripMenuItem 一時保存した状態を復元RToolStripMenuItem;
778806 private System.Windows.Forms.ToolStripMenuItem 絞り込みNToolStripMenuItem;
807+ private System.Windows.Forms.ToolStripMenuItem 表示PToolStripMenuItem;
808+ private System.Windows.Forms.ToolStripMenuItem サムネイル表示切り替えTToolStripMenuItem;
809+ private System.Windows.Forms.ToolStripMenuItem プレビューモード切り替えToolStripMenuItem;
779810 }
780811 }
781812
--- SCFiler2/PasteClipboard.cs (revision 94)
+++ SCFiler2/PasteClipboard.cs (revision 95)
@@ -41,7 +41,14 @@
4141
4242 //ペースト(コピーまたは移動)を実行
4343 if (pasteType == ClipboardManager.EffectType.Copy) {
44- Job copyJob = new CopyJob(new Folder(targetView.CurrentPath), itemsInClipboard);
44+ Job copyJob;
45+ try {
46+ copyJob = new CopyJob(new Folder(targetView.CurrentPath), itemsInClipboard);
47+ } catch (InvalidPreConditionJobException ex) {
48+ SCFiler2System.ShowDialogMessage(ex.Message);
49+ return;
50+ }
51+
4552 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
4653 JobManager.Instance.AddJob(copyJob);
4754 } else {
@@ -51,7 +58,14 @@
5158 ViewInterfaces.CheckUpdateAllView();
5259 }
5360 } else if (pasteType == ClipboardManager.EffectType.Cut) {
54- MoveJob moveJob = new MoveJob(new Folder(targetView.CurrentPath), itemsInClipboard);
61+ MoveJob moveJob;
62+ try {
63+ moveJob = new MoveJob(new Folder(targetView.CurrentPath), itemsInClipboard);
64+ } catch (InvalidPreConditionJobException ex) {
65+ SCFiler2System.ShowDialogMessage(ex.Message);
66+ return;
67+ }
68+
5569 if (SCFiler2System.Instance.Option.Application.IsAllowOperationWhileCopyMoveDel) {
5670 JobManager.Instance.AddJob(moveJob);
5771 Clipboard.Clear();
Show on old repository browser