From 3557378b4e64b172ff36785884dc6409d2f4eb17 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Tue, 27 Oct 2015 11:58:16 +0200 Subject: [PATCH] Fix fs copyFile when source and target are the same When source and target file are the same, copyFile produces empty file. Add check and if they are the same, do not execute any action. Move fs tests from appbuilder-cli to common. Add tests for copyFile. --- lib/common | 2 +- test/stubs.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/common b/lib/common index 2a8e5c9591..05c00c7312 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 2a8e5c959132ea93870ee8c3e68feb67a8a33281 +Subproject commit 05c00c7312823ad7410c90afc9beb0daa6957fbe diff --git a/test/stubs.ts b/test/stubs.ts index 6306d7765f..9d94950491 100644 --- a/test/stubs.ts +++ b/test/stubs.ts @@ -164,6 +164,10 @@ export class FileSystemStub implements IFileSystem { readStdin(): IFuture { return undefined; } + + renameIfExists(oldPath: string, newPath: string): IFuture { + return undefined; + } } export class ErrorsStub implements IErrors {