Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to preserve relative folder structure between .sln files #162

Merged
merged 2 commits into from
Apr 18, 2021

Conversation

jnm2
Copy link
Contributor

@jnm2 jnm2 commented Apr 18, 2021

Closes #159

Passing /root:"C:\Users\Joseph\Source\Repos":

image

As a test, passing /root:"C:\Users\Joseph\Source":

image

Comment on lines 339 to 343
var relativePath = Paths.MakeRelativeToFolder(Path.GetDirectoryName(path), rootPath);
var segments = relativePath.Split(new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);

foreach (var segment in segments)
solutionFolder = solutionFolder.GetOrCreateFolder(segment);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about as simple as I can imagine it being. Nice design!

src/HtmlGenerator/Program.cs Outdated Show resolved Hide resolved
@jnm2 jnm2 force-pushed the relative_sln_folders branch from 53c2c83 to d1b4801 Compare April 18, 2021 02:09
@KirillOsenkov
Copy link
Owner

Looks good. Let me know when it's ready and I'll push the button.

@KirillOsenkov
Copy link
Owner

Fantastic, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Putting projects within folders in the sidebar
2 participants