File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
GVFS.UnitTests/CommandLine Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ static HooksInstaller()
2828 public static string MergeHooksData ( string [ ] defaultHooksLines , string filename , string hookName )
2929 {
3030 IEnumerable < string > valuableHooksLines = defaultHooksLines . Where ( line => ! string . IsNullOrEmpty ( line . Trim ( ) ) ) ;
31- string absolutePathToHooksExecutable = Path . Combine ( ExecutingDirectory , GVFSPlatform . Instance . Constants . GVFSHooksExecutableName ) ;
31+ /* Wrap in quotes to handle spaces in the path */
32+ string absolutePathToHooksExecutable = $ "\" { Path . Combine ( ExecutingDirectory , GVFSPlatform . Instance . Constants . GVFSHooksExecutableName ) } \" ";
3233
3334 if ( valuableHooksLines . Contains ( GVFSPlatform . Instance . Constants . GVFSHooksExecutableName , GVFSPlatform . Instance . Constants . PathComparer ) )
3435 {
Original file line number Diff line number Diff line change @@ -16,9 +16,7 @@ public class HooksInstallerTests
1616 {
1717 private const string Filename = "hooksfile" ;
1818 private readonly string expectedAbsoluteGvfsHookPath =
19- Path . Combine (
20- Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ,
21- GVFSPlatform . Instance . Constants . GVFSHooksExecutableName ) ;
19+ $ "\" { Path . Combine ( Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) , GVFSPlatform . Instance . Constants . GVFSHooksExecutableName ) } \" ";
2220
2321 [ TestCase ]
2422 [ Category ( CategoryConstants . ExceptionExpected ) ]
You can’t perform that action at this time.
0 commit comments