From 745644cdc2d23cc28b602413b186c8fa98493016 Mon Sep 17 00:00:00 2001
From: SeeBasTStick <sebastian.stock@hhu.de>
Date: Thu, 11 Jun 2020 08:28:04 +0200
Subject: [PATCH] server now create a tmp folder to dump errors from prob

---
 server/src/server.ts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/server/src/server.ts b/server/src/server.ts
index dd293b5..946a8ef 100644
--- a/server/src/server.ts
+++ b/server/src/server.ts
@@ -166,10 +166,16 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
 
 	let documentPath: path.ParsedPath = path.parse(URI.parse(textDocument.uri).path);
 
-	let errorPath: string = documentPath.dir + '/_error.json'
+	let errorDic : string = documentPath.dir + '/tmp'
+	let errorPath: string = errorDic + '/_error.json'
+
 
 	const { exec } = require('child_process');
 
+	if (!fs.existsSync(errorDic)){
+		fs.mkdirSync(errorDic);
+	}
+
 	fs.writeFile(errorPath, "", () => { }) //Insure a clean error file
 
 	let command: string = getCommand(URI.parse(textDocument.uri).path, errorPath, settings)
-- 
GitLab