This commit is contained in:
Robert 2024-06-13 12:55:27 +00:00
Родитель a99488c5e7
Коммит ac7ce1bc11
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -1,6 +1,6 @@
import type { CancellationToken } from "vscode";
import { Uri, window } from "vscode";
import { join, sep, basename, relative } from "path";
import { join, sep, basename, relative, normalize, resolve } from "path";
import { dump, load } from "js-yaml";
import { copy, writeFile, readFile, mkdirp } from "fs-extra";
import type { DirectoryResult } from "tmp-promise";
@ -251,14 +251,15 @@ interface RemoteQueryTempDir {
}
async function createRemoteQueriesTempDirectory(): Promise<RemoteQueryTempDir> {
const absoluteTmpDir = normalize(resolve(tmpDir.name));
const remoteQueryDir = await dir({
dir: tmpDir.name,
dir: absoluteTmpDir,
unsafeCleanup: true,
});
const queryPackDir = join(remoteQueryDir.path, "query-pack");
await mkdirp(queryPackDir);
const compiledPackDir = join(remoteQueryDir.path, "compiled-pack");
const bundleFile = await getPackedBundlePath(tmpDir.name);
const bundleFile = await getPackedBundlePath(absoluteTmpDir);
return { remoteQueryDir, queryPackDir, compiledPackDir, bundleFile };
}