From: Youngsoo Choi Date: Tue, 12 Sep 2017 12:06:54 +0000 (+0900) Subject: Add exception handling for symlink X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeb5bfd01c1173d36a2afff6a1bffcafd300b56d;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Add exception handling for symlink Change-Id: I013db6f560a5dcf4d9ebf4c4c4cec75043f6be1b Signed-off-by: Youngsoo Choi --- diff --git a/wrt/build/tasks/task-helpers.coffee b/wrt/build/tasks/task-helpers.coffee index 2819c95..113c421 100644 --- a/wrt/build/tasks/task-helpers.coffee +++ b/wrt/build/tasks/task-helpers.coffee @@ -12,6 +12,7 @@ module.exports = (grunt) -> stats = fs.lstatSync(sourcePath) if stats.isSymbolicLink() grunt.file.mkdir(path.dirname(destinationPath)) + grunt.file.delete(destinationPath, force: true) if grunt.file.exists(destinationPath) fs.symlinkSync(fs.readlinkSync(sourcePath), destinationPath) else if stats.isFile() grunt.file.copy(sourcePath, destinationPath)