From 0d1b9ffc310214ffcd43ef5c5b3495de270937d3 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 16 Nov 2017 22:42:58 +0100 Subject: [PATCH] *facepalm* messing with some old code. Thanks windows for taking the way no ones does... --- out/src/extension.js | 2 +- out/src/phpCompletionItem.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/out/src/extension.js b/out/src/extension.js index 64a938b..6120e7d 100755 --- a/out/src/extension.js +++ b/out/src/extension.js @@ -51,7 +51,7 @@ function activate(context) { // Check what files the current document includes/requires var currentFileName = document.uri.fsPath.replace(vscode.workspace.rootPath, '').slice(1); - var currentPath = document.uri.fsPath.replace(vscode.workspace.rootPath, '').replace("src/", ""); + var currentPath = document.uri.fsPath.replace(vscode.workspace.rootPath, '').replace("src", "").replace("//", "/").replace("\\\\", "\\"); // Look through all included/required files for the current document for (var f in Indexer.phpFileFunctions) { diff --git a/out/src/phpCompletionItem.js b/out/src/phpCompletionItem.js index 59865e7..460315b 100755 --- a/out/src/phpCompletionItem.js +++ b/out/src/phpCompletionItem.js @@ -256,7 +256,7 @@ exports.Indexer = { } libraryResult.forEach(function(path) { if (fs.existsSync(path)) { - var fileName = path.replace(vscode.workspace.rootPath, "").replace(vscode.workspace.getConfiguration('php')['pocketMinePath'], "").replace("src", "").replace("//", "/"); + var fileName = path.replace(vscode.workspace.rootPath, "").replace(vscode.workspace.getConfiguration('php')['pocketMinePath'], "").replace("src", "").replace("//", "/").replace("\\\\", "\\"); // Creating the default properties var fileProperties = ["phpFileFunctions", "phpFileStaticFunctions", "phpFileUses", "phpFileProperties"]; fileProperties.forEach(function(func) {