Skip to content

Commit

Permalink
change permission
Browse files Browse the repository at this point in the history
  • Loading branch information
tinayuangao committed Jan 6, 2017
1 parent 8a1bc82 commit 2b4e66d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions e2e/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ export class Screenshot {
var dir = path.resolve(this.dir, 'screenshots');
if (!fs.existsSync(dir)) {
console.error(`making dir for ${dir}`);
fs.mkdirSync(dir, 0x744);
fs.mkdirSync(dir, '777');
}
console.error(`write to file ${this.fullPath}`);
fs.writeFileSync(this.fullPath, png, {encoding: 'base64' });
console.error(`wwrite is done`);

if (fs.existsSync(dir)) {
console.error(`write to file ${this.fullPath}`);
fs.writeFileSync(this.fullPath, png/*, {encoding: 'base64' }*/);
console.error(`wwrite is done`);
} else {
console.error(`make dir failed`);
}

}
}

Expand Down

0 comments on commit 2b4e66d

Please sign in to comment.