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

Do not append an identical file extension #1328

Closed
wants to merge 2 commits into from
Closed

Do not append an identical file extension #1328

wants to merge 2 commits into from

Conversation

bourgeoa
Copy link
Member

@bourgeoa bourgeoa commented Oct 23, 2019

Fixes #1318

Problem identified in jshttp/mime-types#23

@bourgeoa
Copy link
Member Author

bourgeoa commented Oct 23, 2019

@RubenVerborgh
it solves foo.ext$.ext that should be kept as foo.ext
this will help resolve issue #1318 (see comments in - SolidOS/folder-pane#5)

I checked that I have the same test errors with and without the fix.
I also build a tag v5.2.0 pod server with the fix.

@@ -162,6 +162,15 @@ class ResourceMapper {
return extension && this._types[extension[1].toLowerCase()] || this._defaultContentType
}

// hack to fix file.ext$.ext --> file.ext
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not do hacks in this class that's actually in good shape 😉

Copy link
Contributor

@RubenVerborgh RubenVerborgh left a comment

Choose a reason for hiding this comment

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

Thanks! Kept test; replaced with non-hack.

@RubenVerborgh RubenVerborgh changed the title fix to foo.mp3$.mp3 Do not append an identical file extension Oct 23, 2019
@jaxoncreed
Copy link
Contributor

Continued in #1336

@jaxoncreed jaxoncreed closed this Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.mp3 files uploaded with dataBrowser as .mp3$.mp3
3 participants