Skip to content

Commit b112484

Browse files
committed
Fix mpu -l does not work in current source.
1 parent e8d12a8 commit b112484

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/mpu/AssetFileImporter.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,19 @@ public void AssembleAssetTree( string sourceProjectPath, string outputDirectoryP
9494

9595
var sourceDirectoryPath = Path.GetDirectoryName( sourceProjectPath );
9696
var relativePrefix = ".." + Path.DirectorySeparatorChar;
97-
foreach ( var sourceFileRelativePath in this.ParseProjectFile( sourceProjectPath ).Select( p => p.Replace( '\\', Path.DirectorySeparatorChar )) )
97+
foreach ( var sourceFileRelativePath in this.ParseProjectFile( sourceProjectPath ).Select( p => p.Replace( '\\', Path.DirectorySeparatorChar ) ) )
9898
{
9999
var destinationFilePath =
100100
Path.Combine(
101101
outputDirectoryPath,
102-
new String(
103-
( sourceFileRelativePath.StartsWith( relativePrefix ) ? sourceFileRelativePath.Substring( 3 ) : sourceFileRelativePath ) // remove relative
102+
sourceFileRelativePath.StartsWith( relativePrefix )
103+
? new String(
104+
sourceFileRelativePath.Substring( 3 ) // remove relative
104105
.SkipWhile( c => c != Path.DirectorySeparatorChar) // remove project name portion
105106
.Skip( 1 )
106107
.ToArray()
107108
)
109+
: sourceFileRelativePath // descendant path only
108110
);
109111
// ReSharper disable once AssignNullToNotNullAttribute
110112
Directory.CreateDirectory( Path.GetDirectoryName( destinationFilePath ) );

0 commit comments

Comments
 (0)