Skip to content

Commit

Permalink
fix: Fixed .asar file locking (close #437) (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias authored and JohnstonCode committed Mar 28, 2019
1 parent 2ba786a commit 66af99b
Show file tree
Hide file tree
Showing 20 changed files with 3,027 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/commands/command.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import {
commands,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deleteUnversioned.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs";
import * as fs from "original-fs";
import { SourceControlResourceState, window } from "vscode";
import { deleteDirectory } from "../util";
import { Command } from "./command";
Expand Down
2 changes: 1 addition & 1 deletion src/commands/openFile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs";
import * as fs from "original-fs";
import {
SourceControlResourceState,
TextDocumentShowOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/fs/exists.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { access } from "fs";
import { access } from "original-fs";

export function exists(path: string): Promise<boolean> {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/fs/readdir.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readdir as fsReaddir } from "fs";
import { readdir as fsReaddir } from "original-fs";

export function readdir(path: string): Promise<string[]> {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/fs/stat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stat as fsStat, Stats } from "fs";
import { stat as fsStat, Stats } from "original-fs";

export function stat(filePath: string): Promise<Stats> {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/historyView/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createHash } from "crypto";
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import {
commands,
Expand Down
2 changes: 1 addition & 1 deletion src/historyView/repoLogProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import {
commands,
Expand Down
2 changes: 1 addition & 1 deletion src/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stats } from "fs";
import { Stats } from "original-fs";
import * as path from "path";
import {
commands,
Expand Down
2 changes: 1 addition & 1 deletion src/svnRepository.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import * as tmp from "tmp";
import { Uri, workspace } from "vscode";
Expand Down
4 changes: 2 additions & 2 deletions src/tempFiles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use import { promises as fs } from "fs"; when nodejs will be updated
import * as fs from "fs";
// use import { promises as fs } from "original-fs"; when nodejs will be updated
import * as fs from "original-fs";
import * as os from "os";
import * as path from "path";
import * as util from "util";
Expand Down
2 changes: 1 addition & 1 deletion src/test/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as assert from "assert";

// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import { commands, Uri } from "vscode";
import { ISvnResourceGroup } from "../common/types";
Expand Down
2 changes: 1 addition & 1 deletion src/test/istanbultestrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*--------------------------------------------------------*/

"use strict";
import * as fs from "fs";
import * as fs from "original-fs";
import * as glob from "glob";
import * as istanbul from "istanbul";
import * as Mocha from "mocha";
Expand Down
2 changes: 1 addition & 1 deletion src/test/repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as assert from "assert";

// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import { commands, Uri, window, workspace } from "vscode";
import { Model } from "../model";
Expand Down
2 changes: 1 addition & 1 deletion src/test/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as cp from "child_process";
import { ChildProcess, SpawnOptions } from "child_process";
import * as fs from "fs";
import * as fs from "original-fs";
import * as os from "os";
import { type } from "os";
import * as path from "path";
Expand Down
2 changes: 1 addition & 1 deletion src/tools/generateConfigSectionForReadme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFileSync } from "fs";
import { readFileSync } from "original-fs";
import { join } from "path";
import { cwd } from "process";

Expand Down
2 changes: 1 addition & 1 deletion src/treeView/nodes/incomingChangeNode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fs from "fs";
import * as fs from "original-fs";
import * as path from "path";
import { TreeItem, TreeItemCollapsibleState, Uri } from "vscode";
import { Repository } from "../../repository";
Expand Down
Loading

0 comments on commit 66af99b

Please sign in to comment.