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

Fix file extension detection for files with multiple dot separators #1408

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nerlihmax
Copy link

Hi!

I have issues with the flag --add-encoding-exts=js,html,css when uploads js static on production buckets. My files have names like widget-no-csr.oWiXNN3Poy.js or widget-no-csr.oWiXNN3Poy.js.gz, where is more than one dot symbol separator. Because

s3cmd/S3/S3.py

Line 736 in 10aea09

parts = filename.rsplit('.',2)
there is file extension oWiXNN3Poy for first file and js for second. That looks like a bug. I fixed that, but I think it could be kind of dangerous because it breaks backward compability.

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.

1 participant