mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Check for a null as well
This will help the description be populated with the correct information if only the name is defined.
This commit is contained in:
@@ -217,7 +217,7 @@ namespace SabreTools
|
||||
// Double check to see what it needs to be named
|
||||
_basePath = (_inputs.Count > 0 ? (File.Exists(_inputs[0]) ? _inputs[0] : _inputs[0] + Path.DirectorySeparatorChar) : "");
|
||||
_basePath = (_basePath != "" ? Path.GetFullPath(_basePath) : "");
|
||||
if (_datdata.Name == "")
|
||||
if (String.IsNullOrEmpty(_datdata.Name))
|
||||
{
|
||||
if (_inputs.Count > 1)
|
||||
{
|
||||
@@ -232,8 +232,8 @@ namespace SabreTools
|
||||
_datdata.Name = _basePath.Split(Path.DirectorySeparatorChar).Last();
|
||||
}
|
||||
}
|
||||
_datdata.Name = (_datdata.Name == "" ? "Default" : _datdata.Name);
|
||||
_datdata.Description = (_datdata.Description == "" ? _datdata.Name + (_bare ? "" : " (" + _datdata.Date + ")") : _datdata.Description);
|
||||
_datdata.Name = (String.IsNullOrEmpty(_datdata.Name) ? "Default" : _datdata.Name);
|
||||
_datdata.Description = (String.IsNullOrEmpty(_datdata.Description) ? _datdata.Name + (_bare ? "" : " (" + _datdata.Date + ")") : _datdata.Description);
|
||||
|
||||
// Create and open the output file for writing
|
||||
FileStream fs = File.Create(Style.CreateOutfileName(Environment.CurrentDirectory, _datdata));
|
||||
|
||||
Reference in New Issue
Block a user