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

Properly map virtual path when useDisplayPaths = false #61

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Properly map virtual path when useDisplayPaths = false #61

merged 1 commit into from
Apr 19, 2022

Conversation

Propaganistas
Copy link
Contributor

@Propaganistas Propaganistas commented Apr 17, 2022

There's currently no code difference in normaliseObject() when determining the virtual and display path.

When useDisplayPaths = false, this leads to unexpected behavior: display_path will be used as the FileAttributes "path" property while the configuration explicitly stated to not return display paths.

Example:

  • useDisplayPaths = false
  • list contents of a directory
  • read the path of an item and use it to, for example, read last modification date
  • the path is a display path, but the last modification date correctly assumes it'll be a virtual path, so an exception is thrown.

This simple code changes fixes that behavior.

@masbug masbug merged commit 5e384f1 into masbug:2.x Apr 19, 2022
@masbug
Copy link
Owner

masbug commented Apr 19, 2022

Thank you!

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.

2 participants