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

Relative paths for directory listing entries #137

Merged
merged 2 commits into from
Sep 12, 2022

Conversation

joseluisq
Copy link
Collaborator

@joseluisq joseluisq commented Sep 12, 2022

Description

It provides relative path support for directory listing entries (file/directory links) either if --redirect-trailing-slash is enabled or not.

SWS will use relative paths by default regardless of the "redirect trailing slash" feature.
However, when "redirect trailing slash" is disabled and a directory request URI doesn't contain a trailing slash then entries should contain the parent/entry-name as a link format.
Otherwise, SWS will just use the entry-name as a link (default behavior).

Note that in both cases, SWS will append a trailing slash if the entry is a directory.

Motivation and Context

Feature request #136

How Has This Been Tested?

Unit tests on tests/dir_listing.rs that keep relative paths either when --redirect-trailing-slash is enabled or disabled.

Screenshots (if appropriate):

No

@joseluisq joseluisq added enhancement New feature or request v2 v2 release labels Sep 12, 2022
@joseluisq joseluisq self-assigned this Sep 12, 2022
@joseluisq joseluisq merged commit 91b6ba2 into master Sep 12, 2022
@bors bors bot deleted the feature/relative_path_for_directory_listing_entries branch September 12, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2 v2 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant