public IEnumerable<InstalledFile> Verify(string rootDirectory)\r
{\r
foreach (InstalledFile file in Entries) {\r
- if (! file.Hash.Validate(Path.Combine(rootDirectory, file.Path)) ) {\r
+ string filepath = Path.Combine(rootDirectory, file.Path);\r
+ \r
+ if (File.Exists(filepath) && (! file.Hash.Validate(filepath))) {\r
yield return file;\r
}\r
}\r
}\r
\r
// 変更済みファイルをinstallSrcの方に反映させる\r
- if (! Directory.Exists(Path.GetDirectoryName(toBeChangedFilePath))) {\r
- // フォルダーがない場合は作る\r
- Directory.CreateDirectory(Path.GetDirectoryName(toBeChangedFilePath));\r
+ if (File.Exists(changedFilePath)) {\r
+ if (! Directory.Exists(Path.GetDirectoryName(toBeChangedFilePath))) {\r
+ // フォルダーがない場合は作る\r
+ Directory.CreateDirectory(Path.GetDirectoryName(toBeChangedFilePath));\r
+ }\r
+ File.Copy(changedFilePath, toBeChangedFilePath);\r
}\r
- File.Copy(changedFilePath, toBeChangedFilePath);\r
}\r
}\r
} else {\r