hotfix: directory init fixes & installer file naming system
This commit is contained in:
@@ -218,7 +218,7 @@ namespace CarManagerV3
|
||||
Car other = cars.Where(c => c.Order < order).OrderByDescending(c => c.Order).FirstOrDefault();
|
||||
if (other != null)
|
||||
{
|
||||
Console.WriteLine($"Swapping order of {car.ToString()} ({car.Order}) and {other.ToString()} ({other.Order})");
|
||||
System.Diagnostics.Debug.WriteLine($"Swapping order of {car.ToString()} ({car.Order}) and {other.ToString()} ({other.Order})");
|
||||
int temp = car.Order;
|
||||
car.Order = other.Order;
|
||||
other.Order = temp;
|
||||
@@ -235,7 +235,7 @@ namespace CarManagerV3
|
||||
Car other = cars.Where(c => c.Order > order).OrderBy(c => c.Order).FirstOrDefault();
|
||||
if (other != null)
|
||||
{
|
||||
Console.WriteLine($"Swapping order of {car.ToString()} ({car.Order}) and {other.ToString()} ({other.Order})");
|
||||
System.Diagnostics.Debug.WriteLine($"Swapping order of {car.ToString()} ({car.Order}) and {other.ToString()} ({other.Order})");
|
||||
int temp = car.Order;
|
||||
car.Order = other.Order;
|
||||
other.Order = temp;
|
||||
|
||||
@@ -50,11 +50,11 @@ namespace CarManagerV3
|
||||
{
|
||||
try
|
||||
{
|
||||
//string directory = Path.GetDirectoryName(path);
|
||||
string directory = Path.GetDirectoryName(path);
|
||||
Console.WriteLine($"Initializing file and folders for path: {path}");
|
||||
if (!Directory.Exists(path))
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
if(!folderOnly) InitializeFile(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user