mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] String.Empty
This commit is contained in:
@@ -221,7 +221,7 @@ namespace SabreTools.Helper.Tools
|
||||
/// <returns>Name of the extracted file, null on error</returns>
|
||||
public static string ExtractItem(string input, string entryName, string tempDir, Logger logger)
|
||||
{
|
||||
string realEntry = "";
|
||||
string realEntry = String.Empty;
|
||||
Stream ms = ExtractStream(input, entryName, out realEntry, logger);
|
||||
|
||||
// If we got out a null or empty entry, then we don't have a stream
|
||||
@@ -265,7 +265,7 @@ namespace SabreTools.Helper.Tools
|
||||
public static Stream ExtractStream(string input, string entryName, out string realEntry, Logger logger)
|
||||
{
|
||||
// Set the real entry name
|
||||
realEntry = "";
|
||||
realEntry = String.Empty;
|
||||
|
||||
// Get a writable stream to return
|
||||
Stream st = new MemoryStream();
|
||||
@@ -433,7 +433,7 @@ namespace SabreTools.Helper.Tools
|
||||
{
|
||||
logger.Verbose("Found archive of type: " + at);
|
||||
long size = 0;
|
||||
string crc = "";
|
||||
string crc = String.Empty;
|
||||
|
||||
switch (at)
|
||||
{
|
||||
@@ -445,14 +445,14 @@ namespace SabreTools.Helper.Tools
|
||||
{
|
||||
logger.Verbose("Entry found: '" + entry.Key + "': "
|
||||
+ (size == 0 ? entry.Size : size) + ", "
|
||||
+ (crc == "" ? entry.Crc.ToString("X").ToLowerInvariant() : crc));
|
||||
+ (crc == String.Empty ? entry.Crc.ToString("X").ToLowerInvariant() : crc));
|
||||
|
||||
roms.Add(new Rom
|
||||
{
|
||||
Type = ItemType.Rom,
|
||||
Name = entry.Key,
|
||||
Size = (size == 0 ? entry.Size : size),
|
||||
CRC = (crc == "" ? entry.Crc.ToString("X").ToLowerInvariant() : crc),
|
||||
CRC = (crc == String.Empty ? entry.Crc.ToString("X").ToLowerInvariant() : crc),
|
||||
|
||||
Machine = new Machine
|
||||
{
|
||||
@@ -481,14 +481,14 @@ namespace SabreTools.Helper.Tools
|
||||
{
|
||||
logger.Verbose("Entry found: '" + entry.Key + "': "
|
||||
+ (size == 0 ? entry.Size : size) + ", "
|
||||
+ (crc == "" ? entry.Crc.ToString("X").ToLowerInvariant() : crc));
|
||||
+ (crc == String.Empty ? entry.Crc.ToString("X").ToLowerInvariant() : crc));
|
||||
|
||||
roms.Add(new Rom
|
||||
{
|
||||
Type = ItemType.Rom,
|
||||
Name = entry.Key,
|
||||
Size = (size == 0 ? entry.Size : size),
|
||||
CRC = (crc == "" ? entry.Crc.ToString("X").ToLowerInvariant() : crc),
|
||||
CRC = (crc == String.Empty ? entry.Crc.ToString("X").ToLowerInvariant() : crc),
|
||||
|
||||
Machine = new Machine
|
||||
{
|
||||
@@ -507,14 +507,14 @@ namespace SabreTools.Helper.Tools
|
||||
{
|
||||
logger.Verbose("Entry found: '" + entry.Key + "': "
|
||||
+ (size == 0 ? entry.Size : size) + ", "
|
||||
+ (crc == "" ? entry.Crc.ToString("X").ToLowerInvariant() : crc));
|
||||
+ (crc == String.Empty ? entry.Crc.ToString("X").ToLowerInvariant() : crc));
|
||||
|
||||
roms.Add(new Rom
|
||||
{
|
||||
Type = ItemType.Rom,
|
||||
Name = entry.Key,
|
||||
Size = (size == 0 ? entry.Size : size),
|
||||
CRC = (crc == "" ? entry.Crc.ToString("X").ToLowerInvariant() : crc),
|
||||
CRC = (crc == String.Empty ? entry.Crc.ToString("X").ToLowerInvariant() : crc),
|
||||
|
||||
Machine = new Machine
|
||||
{
|
||||
@@ -1119,7 +1119,7 @@ namespace SabreTools.Helper.Tools
|
||||
}
|
||||
|
||||
// Get the output archive name from the first rebuild rom
|
||||
string archiveFileName = Path.Combine(outDir, Style.RemovePathUnsafeCharacters(roms[0].Machine.Name) + (roms[0].Machine.Name.EndsWith(".tar") ? "" : ".tar"));
|
||||
string archiveFileName = Path.Combine(outDir, Style.RemovePathUnsafeCharacters(roms[0].Machine.Name) + (roms[0].Machine.Name.EndsWith(".tar") ? String.Empty : ".tar"));
|
||||
|
||||
// Set internal variables
|
||||
Stream tarstream = new MemoryStream();
|
||||
@@ -1445,7 +1445,7 @@ namespace SabreTools.Helper.Tools
|
||||
}
|
||||
|
||||
// Get the output archive name from the first rebuild rom
|
||||
string archiveFileName = Path.Combine(outDir, Style.RemovePathUnsafeCharacters(roms[0].Machine.Name) + (roms[0].Machine.Name.EndsWith(".zip") ? "" : ".zip"));
|
||||
string archiveFileName = Path.Combine(outDir, Style.RemovePathUnsafeCharacters(roms[0].Machine.Name) + (roms[0].Machine.Name.EndsWith(".zip") ? String.Empty : ".zip"));
|
||||
|
||||
// Set internal variables
|
||||
Stream writeStream = null;
|
||||
|
||||
Reference in New Issue
Block a user