File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ private static string ParseFilePath(string path)
29
29
30
30
private static string GetPackageName ( string package ) =>
31
31
package
32
- . Split ( "/" )
32
+ . Split ( Path . DirectorySeparatorChar )
33
33
. First ( ) ;
34
34
35
35
/// <summary>
@@ -47,9 +47,13 @@ private static string GetPackageName(string package) =>
47
47
/// </summary>
48
48
public Dependencies Add ( string package , string dependency )
49
49
{
50
- var path = Path . Combine ( package , ParseFilePath ( dependency ) ) ;
50
+ var p = package . Replace ( '/' , Path . DirectorySeparatorChar ) ;
51
+ var d = dependency . Replace ( '/' , Path . DirectorySeparatorChar ) ;
52
+
53
+ var path = Path . Combine ( p , ParseFilePath ( d ) ) ;
51
54
required . Add ( path ) ;
52
- usedPackages . Add ( GetPackageName ( package ) ) ;
55
+ usedPackages . Add ( GetPackageName ( p ) ) ;
56
+
53
57
return this ;
54
58
}
55
59
@@ -58,8 +62,11 @@ public Dependencies Add(string package, string dependency)
58
62
/// </summary>
59
63
public Dependencies Add ( string package )
60
64
{
61
- required . Add ( package ) ;
62
- usedPackages . Add ( GetPackageName ( package ) ) ;
65
+ var p = package . Replace ( '/' , Path . DirectorySeparatorChar ) ;
66
+
67
+ required . Add ( p ) ;
68
+ usedPackages . Add ( GetPackageName ( p ) ) ;
69
+
63
70
return this ;
64
71
}
65
72
}
You can’t perform that action at this time.
0 commit comments