Skip to content

Commit f39e75e

Browse files
authored
Fix default & build in case of usernames with spaces (#8780)
1 parent cd01c3e commit f39e75e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/Files.Launcher/MessageHandlers/Win32MessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public async Task ParseArgumentsAsync(PipeStream connection, Dictionary<string,
163163
var dataPath = Environment.ExpandEnvironmentVariables("%LocalAppData%\\Files");
164164
if (enable)
165165
{
166-
if (!Win32API.RunPowershellCommand($"-command \"New-Item -Force -Path {dataPath} -ItemType Directory; Copy-Item -Filter *.* -Path '{destFolder}\\*' -Recurse -Force -Destination '{dataPath}'\"", false))
166+
if (!Win32API.RunPowershellCommand($"-command \"New-Item -Force -Path '{dataPath}' -ItemType Directory; Copy-Item -Filter *.* -Path '{destFolder}\\*' -Recurse -Force -Destination '{dataPath}'\"", false))
167167
{
168168
// Error copying files
169169
DetectIsSetAsDefaultFileManager();

src/Files.OpenDialog/CustomOpenDialog/CustomOpenDialog.vcxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
170170
</Link>
171171
<PostBuildEvent>
172-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
172+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.dll" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
173173
</PostBuildEvent>
174174
</ItemDefinitionGroup>
175175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -205,7 +205,7 @@
205205
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
206206
</Link>
207207
<PostBuildEvent>
208-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
208+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.dll" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
209209
</PostBuildEvent>
210210
</ItemDefinitionGroup>
211211
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
@@ -242,7 +242,7 @@
242242
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
243243
</Link>
244244
<PostBuildEvent>
245-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
245+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.dll" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
246246
</PostBuildEvent>
247247
</ItemDefinitionGroup>
248248
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -281,7 +281,7 @@
281281
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
282282
</Link>
283283
<PostBuildEvent>
284-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
284+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.dll" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
285285
</PostBuildEvent>
286286
</ItemDefinitionGroup>
287287
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -319,7 +319,7 @@
319319
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
320320
</Link>
321321
<PostBuildEvent>
322-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
322+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.dll" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
323323
</PostBuildEvent>
324324
</ItemDefinitionGroup>
325325
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
@@ -358,7 +358,7 @@
358358
<OutputFile>$(OutDir)CustomOpenDialog$(PlatformArchitecture)$(TargetExt)</OutputFile>
359359
</Link>
360360
<PostBuildEvent>
361-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.dll $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
361+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.dll" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
362362
</PostBuildEvent>
363363
</ItemDefinitionGroup>
364364
<ItemGroup>

src/Files.OpenDialog/FilesLauncher/FilesLauncher.vcxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
<OutputFile>$(OutDir)FilesLauncher$(TargetExt)</OutputFile>
136136
</Link>
137137
<PostBuildEvent>
138-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.exe $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
138+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.exe" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
139139
</PostBuildEvent>
140140
</ItemDefinitionGroup>
141141
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -156,7 +156,7 @@
156156
<OutputFile>$(OutDir)FilesLauncher$(TargetExt)</OutputFile>
157157
</Link>
158158
<PostBuildEvent>
159-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.exe $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
159+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.exe" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
160160
</PostBuildEvent>
161161
</ItemDefinitionGroup>
162162
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -173,7 +173,7 @@
173173
<OutputFile>$(OutDir)FilesLauncher$(TargetExt)</OutputFile>
174174
</Link>
175175
<PostBuildEvent>
176-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.exe $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
176+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.exe" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
177177
</PostBuildEvent>
178178
</ItemDefinitionGroup>
179179
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
@@ -190,7 +190,7 @@
190190
<OutputFile>$(OutDir)FilesLauncher$(TargetExt)</OutputFile>
191191
</Link>
192192
<PostBuildEvent>
193-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.exe $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
193+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.exe" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
194194
</PostBuildEvent>
195195
</ItemDefinitionGroup>
196196
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -211,7 +211,7 @@
211211
<OutputFile>$(OutDir)FilesLauncher$(TargetExt)</OutputFile>
212212
</Link>
213213
<PostBuildEvent>
214-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.exe $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
214+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.exe" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
215215
</PostBuildEvent>
216216
</ItemDefinitionGroup>
217217
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
@@ -232,7 +232,7 @@
232232
<OutputFile>$(OutDir)FilesLauncher$(TargetExt)</OutputFile>
233233
</Link>
234234
<PostBuildEvent>
235-
<Command>xcopy /s /y $(ProjectDir)$(OutDir)*.exe $(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog</Command>
235+
<Command>xcopy /s /y "$(ProjectDir)$(OutDir)*.exe" "$(ProjectDir)..\..\..\src\Files.Launcher\Assets\FilesOpenDialog"</Command>
236236
</PostBuildEvent>
237237
</ItemDefinitionGroup>
238238
<ItemGroup>

0 commit comments

Comments
 (0)