Skip to content

Commit

Permalink
TBLEditor should now create outpath dirs if they don't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lomeli12 committed Dec 10, 2018
1 parent 180cab3 commit fa8efb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion TBLEditorCore/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using TBLLib;
Expand Down Expand Up @@ -46,6 +46,10 @@ static void Main(string[] args) {
fileInfo = new FileInfo(outPath);
outPath = fileInfo.FullName;

var outDir = Path.GetDirectoryName(outPath);
if (!Directory.Exists(outDir))
Directory.CreateDirectory(outDir);

switch (mode) {
case TBLMode.COMPILE:
var lines = File.ReadLines(path);
Expand Down
6 changes: 5 additions & 1 deletion TBLEditorWin/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using TBLLib;
Expand Down Expand Up @@ -46,6 +46,10 @@ static void Main(string[] args) {
fileInfo = new FileInfo(outPath);
outPath = fileInfo.FullName;

var outDir = Path.GetDirectoryName(outPath);
if (!Directory.Exists(outDir))
Directory.CreateDirectory(outDir);

switch (mode) {
case TBLMode.COMPILE:
var lines = File.ReadLines(path);
Expand Down

0 comments on commit fa8efb5

Please sign in to comment.