Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

test: unlink temp file at test start

The file has a long name that's apparently impossible to remove with
`git clean` on Windows.
  • Loading branch information...
bnoordhuis committed Mar 2, 2013
1 parent d1b4dcd commit 93156a60570fe4932bbc13a97b4c7ef0a791b7f4
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/simple/test-fs-long-path.js
@@ -31,6 +31,13 @@ var fileNameLen = Math.max(260 - common.tmpDir.length - 1, 1);
var fileName = path.join(common.tmpDir, new Array(fileNameLen + 1).join('x'));
var fullPath = path.resolve(fileName);

try {
fs.unlinkSync(fullPath);
}
catch (e) {
// Ignore.
}

console.log({
filenameLength: fileName.length,
fullPathLength: fullPath.length

0 comments on commit 93156a6

Please sign in to comment.
You can’t perform that action at this time.