• R/O
  • HTTP
  • SSH
  • HTTPS

CompleteEraser: 提交


Commit MetaInfo

修订版fa22a7a84bdc91d0481bf538d3b78a524f1cc213 (tree)
时间2012-10-18 18:50:29
作者konekoneko <jbh03215@gmai...>
Commiterkonekoneko

Log Message

削除完了時に例外が発生することがある点を修正した
wchat_tのサイズが正しく求められていないバグを修正した

更改概述

差异

--- a/CompleteEraser/MainForm.cs
+++ b/CompleteEraser/MainForm.cs
@@ -77,7 +77,7 @@ namespace CompleteEraser
7777 if (e.fileName == null)
7878 this.label2.Text = Resources.FINAL_PROCESS;
7979 else
80- this.label2.Text = string.Format(Resources.FILE_PROCESS, this.TrimFullPath(e.fileName));
80+ this.label2.Text = string.Format(Resources.FILE_PROCESS, Path.GetFileName(e.fileName));
8181 }
8282
8383 void op_Progressed(object sender, ProgressedEventArgs e)
@@ -133,21 +133,5 @@ namespace CompleteEraser
133133 this.info.Dispose();
134134 }
135135
136- public string TrimFullPath(string filepath)
137- {
138- if (filepath == null || filepath == "")
139- return string.Empty;
140- string DirectoryPart = Path.GetDirectoryName(filepath);
141- string FilenamePart = Path.GetFileName(filepath);
142- string[] slice = DirectoryPart.Split('\\');
143- if (slice.Length > 3)
144- {
145- DirectoryPart = slice[0] + "\\..\\" + slice[slice.Length - 1];
146- return DirectoryPart + "\\" + FilenamePart;
147- }
148- else
149- return filepath;
150- }
151-
152136 }
153137 }
--- a/CompleteEraser/SharedInfo.cs
+++ b/CompleteEraser/SharedInfo.cs
@@ -23,7 +23,8 @@ namespace CompleteEraser
2323 while (sr.EndOfStream == false)
2424 {
2525 string s = sr.ReadLine();
26- yield return s;
26+ if(s != string.Empty && s[0] != '\0')
27+ yield return s;
2728 }
2829 }
2930 finally
--- a/ShellExtension/ContextMenu.cpp
+++ b/ShellExtension/ContextMenu.cpp
@@ -150,7 +150,7 @@ STDMETHODIMP CContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
150150
151151 if (menutype == ClearFileNames)
152152 {
153- UINT mapSize = this->strs.length() * 2;
153+ UINT mapSize = this->strs.length() * sizeof(wchar_t);
154154
155155 m_hMapping = ::CreateFileMappingW(INVALID_HANDLE_VALUE,
156156 NULL,
Show on old repository browser