修订版 | fa22a7a84bdc91d0481bf538d3b78a524f1cc213 (tree) |
---|---|
时间 | 2012-10-18 18:50:29 |
作者 | konekoneko <jbh03215@gmai...> |
Commiter | konekoneko |
削除完了時に例外が発生することがある点を修正した
wchat_tのサイズが正しく求められていないバグを修正した
@@ -77,7 +77,7 @@ namespace CompleteEraser | ||
77 | 77 | if (e.fileName == null) |
78 | 78 | this.label2.Text = Resources.FINAL_PROCESS; |
79 | 79 | 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)); | |
81 | 81 | } |
82 | 82 | |
83 | 83 | void op_Progressed(object sender, ProgressedEventArgs e) |
@@ -133,21 +133,5 @@ namespace CompleteEraser | ||
133 | 133 | this.info.Dispose(); |
134 | 134 | } |
135 | 135 | |
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 | - | |
152 | 136 | } |
153 | 137 | } |
@@ -23,7 +23,8 @@ namespace CompleteEraser | ||
23 | 23 | while (sr.EndOfStream == false) |
24 | 24 | { |
25 | 25 | string s = sr.ReadLine(); |
26 | - yield return s; | |
26 | + if(s != string.Empty && s[0] != '\0') | |
27 | + yield return s; | |
27 | 28 | } |
28 | 29 | } |
29 | 30 | finally |
@@ -150,7 +150,7 @@ STDMETHODIMP CContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici) | ||
150 | 150 | |
151 | 151 | if (menutype == ClearFileNames) |
152 | 152 | { |
153 | - UINT mapSize = this->strs.length() * 2; | |
153 | + UINT mapSize = this->strs.length() * sizeof(wchar_t); | |
154 | 154 | |
155 | 155 | m_hMapping = ::CreateFileMappingW(INVALID_HANDLE_VALUE, |
156 | 156 | NULL, |