This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix NuGet package failing on users using folders with space
- Fixing inconsistent behavior in package referencing in Android project (fixed in sample)
- Loading branch information
Showing
18 changed files
with
1,060 additions
and
1,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text; | ||
|
||
namespace BlazorMobile.Build.Cli.Helper | ||
{ | ||
public static class PathHelper | ||
{ | ||
private static string ReplaceLastOccurrence(string Source, string Find, string Replace) | ||
{ | ||
int place = Source.LastIndexOf(Find); | ||
|
||
if (place == -1) | ||
return Source; | ||
|
||
string result = Source.Remove(place, Find.Length).Insert(place, Replace); | ||
return result; | ||
} | ||
|
||
/// <summary> | ||
/// CMD and MSBuild seems to escape quote sometime instead | ||
/// of escaping the path delimiter, even if using MSBuild::Escape | ||
/// function. This method replace and ending quote by a path | ||
/// delimiter instead, for fixing this possible behavior | ||
/// </summary> | ||
/// <returns></returns> | ||
public static string MSBuildQuoteFixer(string input) | ||
{ | ||
if (input.EndsWith('"')) | ||
{ | ||
input = ReplaceLastOccurrence(input, "\"", Path.DirectorySeparatorChar.ToString()); | ||
} | ||
|
||
return input; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.