Skip to content

Commit

Permalink
fix: temp files are created in uid directory (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnstonCode committed Jan 9, 2020
1 parent 3dd7864 commit b779ef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/tempFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import * as crypto from "crypto";
import { iconv } from "./vscodeModules";
import { configuration } from "./helpers/configuration";

export const tempdir = path.join(os.tmpdir(), "vscode-svn");
export const tempdir = path.join(
os.tmpdir(),
`vscode-svn-${os.userInfo().uid.toString()}`
);

export async function createTempSvnRevisionFile(
svnUri: Uri,
Expand Down
2 changes: 1 addition & 1 deletion src/test/tempFiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let osTmpDir = os.tmpdir();
osTmpDir = osTmpDir[0].toLowerCase() + osTmpDir.substr(1);
const tempRevisionPath = join(
osTmpDir,
"vscode-svn",
`vscode-svn-${os.userInfo().uid.toString()}`,
"1181ae15a77d83ac0b077051dfed21ed",
"r30_test.js"
);
Expand Down

0 comments on commit b779ef2

Please sign in to comment.