[issue35981] shutil make_archive create wrong file when base name contains dots at end

2021-02-03 Thread Steve Dower
Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If y

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Tested locally on Win10 pro, and both suggestions of steve.dower worked. I've put a PR (https://github.com/python/cpython/pull/17435) based on his second suggestion. The rationale being that that way, the format function (zip/bztar/etc) will get the abs

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- keywords: +patch, patch pull_requests: +16914, 16915 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17435 ___ Python tracker ___

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- keywords: +patch pull_requests: +16914 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17435 ___ Python tracker _

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-09-11 Thread Steve Dower
Steve Dower added the comment: We can fix this - trailing dots before an extension are supported. Probably the best fix is to defer the "abspath" call until after the extension has been added (or apply "abspath" to the directory and then put the base name back on). -- versions: +Pyt

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: On windows os.path.abspath("foo...bar..") returns "foo...bar" which is used in shutil.make_archive [0] returning foo...bar.zip. @matrixise , I am reopening this and adding Windows so that this can be confirmed as known behavior and closed. https:/

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Could be the case that it's windows specific. For "foo...bar..." abspath returns "foo...bar..." in Python on Mac. I don't have access to Windows but checking this on dotnet fiddle with C# which I hope uses Windows full path strips out the leading d

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this Windows specific? I am unable to reproduce this on Mac and Ubuntu with master and Python 3.7 . ➜ cpython git:(master) ./python.exe -c 'import os, shutil; shutil.make_archive("foo...bar..", "zip", os.path.abspath("./Tools"))' ➜ cpython git:

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have just tried with 3.7.2 and I don't get your error. Python 3.7.2 (default, Jan 16 2019, 19:49:22) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import shutil >>> import os >>> s

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-12 Thread maokk
New submission from maokk : shutil.make_archive("foo...bar..", "zip", os.path.abspath("c:/test")) create zipfile called "foo...bar.zip" not "foo...bar...zip" -- components: Distutils messages: 335388 nosy: dstufft, eric.araujo, highwind priority: normal severity: normal status: open ti