diff --git a/src/Pixel.Persistence.Services.Client/DataManagers/ProjectDataManager.cs b/src/Pixel.Persistence.Services.Client/DataManagers/ProjectDataManager.cs index 7de22363..c2448381 100644 --- a/src/Pixel.Persistence.Services.Client/DataManagers/ProjectDataManager.cs +++ b/src/Pixel.Persistence.Services.Client/DataManagers/ProjectDataManager.cs @@ -114,9 +114,10 @@ public async Task DownloadProjectDataFileByNameAsync(AutomationProject automatio if (IsOnlineMode) { var file = await this.filesClient.DownProjectDataFile(automationProject.ProjectId, projectVersion.ToString(), fileName); + var projectDirectory = Path.Combine(this.applicationFileSystem.GetAutomationProjectWorkingDirectory(automationProject, projectVersion)); using (MemoryStream ms = new MemoryStream(file.Bytes)) { - using (FileStream fs = new FileStream(file.FilePath, FileMode.CreateNew)) + using (FileStream fs = new FileStream(Path.Combine(projectDirectory, file.FilePath), FileMode.Create)) { ms.Seek(0, SeekOrigin.Begin); ms.CopyTo(fs);