mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Update string check; add output path helper
This commit is contained in:
@@ -102,7 +102,7 @@ namespace SabreTools.Library.FileTypes
|
||||
string match = files.Where(s => s.EndsWith(entryName)).FirstOrDefault();
|
||||
|
||||
// If we had a file, copy that over to the new name
|
||||
if (!String.IsNullOrEmpty(match))
|
||||
if (!String.IsNullOrWhiteSpace(match))
|
||||
{
|
||||
realentry = match;
|
||||
File.Copy(match, Path.Combine(outDir, entryName));
|
||||
@@ -141,7 +141,7 @@ namespace SabreTools.Library.FileTypes
|
||||
string match = files.Where(s => s.EndsWith(entryName)).FirstOrDefault();
|
||||
|
||||
// If we had a file, copy that over to the new name
|
||||
if (!String.IsNullOrEmpty(match))
|
||||
if (!String.IsNullOrWhiteSpace(match))
|
||||
{
|
||||
Utilities.TryOpenRead(match).CopyTo(ms);
|
||||
realentry = match;
|
||||
@@ -269,7 +269,7 @@ namespace SabreTools.Library.FileTypes
|
||||
|
||||
if (rom.Type == ItemType.Rom)
|
||||
{
|
||||
if (date && !String.IsNullOrEmpty(((Rom)rom).Date))
|
||||
if (date && !String.IsNullOrWhiteSpace(((Rom)rom).Date))
|
||||
{
|
||||
File.SetCreationTime(fileName, DateTime.Parse(((Rom)rom).Date));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user