diff --git a/lib/services/app-files-updater.ts b/lib/services/app-files-updater.ts index 8eb1aaa807..525b0fa899 100644 --- a/lib/services/app-files-updater.ts +++ b/lib/services/app-files-updater.ts @@ -1,6 +1,7 @@ import * as path from "path"; import * as minimatch from "minimatch"; import * as constants from "../constants"; +import * as fs from "fs"; import Future = require("fibers/future"); export class AppFilesUpdater { @@ -77,7 +78,12 @@ export class AppFilesUpdater { protected copyAppSourceFiles(sourceFiles: string[]): void { let copyFileFutures = sourceFiles.map(source => { let destinationPath = path.join(this.appDestinationDirectoryPath, path.relative(this.appSourceDirectoryPath, source)); - if (this.fs.getFsStats(source).wait().isDirectory()) { + let exists = fs.lstatSync(source); + if (exists.isSymbolicLink()) { + source = fs.realpathSync(source); + exists = fs.lstatSync(source); + } + if (exists.isDirectory()) { return this.fs.createDirectory(destinationPath); } return this.fs.copyFile(source, destinationPath); diff --git a/lib/services/livesync/livesync-service.ts b/lib/services/livesync/livesync-service.ts index 3d909aac85..8dbf8ad115 100644 --- a/lib/services/livesync/livesync-service.ts +++ b/lib/services/livesync/livesync-service.ts @@ -123,7 +123,7 @@ class LiveSyncService implements ILiveSyncService { private partialSync(syncWorkingDirectory: string, onChangedActions: ((event: string, filePath: string, dispatcher: IFutureDispatcher) => void )[]): void { let that = this; - let gazeWatcher = gaze("**/*", { cwd: syncWorkingDirectory }, function (err: any, watcher: any) { + let gazeWatcher = gaze("**/*", { cwd: syncWorkingDirectory, follow: true }, function (err: any, watcher: any) { this.on('all', (event: string, filePath: string) => { fiberBootstrap.run(() => { that.$dispatcher.dispatch(() => (() => {