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)
2929
3030 private static string GetPackageName ( string package ) =>
3131 package
32- . Split ( "/" )
32+ . Split ( Path . DirectorySeparatorChar )
3333 . First ( ) ;
3434
3535 /// <summary>
@@ -47,9 +47,13 @@ private static string GetPackageName(string package) =>
4747 /// </summary>
4848 public Dependencies Add ( string package , string dependency )
4949 {
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 ) ) ;
5154 required . Add ( path ) ;
52- usedPackages . Add ( GetPackageName ( package ) ) ;
55+ usedPackages . Add ( GetPackageName ( p ) ) ;
56+
5357 return this ;
5458 }
5559
@@ -58,8 +62,11 @@ public Dependencies Add(string package, string dependency)
5862 /// </summary>
5963 public Dependencies Add ( string package )
6064 {
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+
6370 return this ;
6471 }
6572 }
You can’t perform that action at this time.
0 commit comments