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

stdlib: keep leading slash in absolute ustar filename prefixes #8309

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

Conversation

jakobsvenningsson
Copy link

The leading slash where previously dropped from absolute ustar filename prefixes:

> TestFileName1 = string:join(lists:duplicate(99, "a"), "").
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
> TestFileName2 = string:join(lists:duplicate(10, "a"), "").
"aaaaaaaaaa"
> TarTestFileName1 = filename:join("/tmp", TestFileName1).
"/tmp/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
> TarTestFileName2 = filename:join("/tmp", TestFileName2).
"/tmp/aaaaaaaaaa"
> [ok = file:write_file(TestFileName, "hello, world\n") || TestFileName <- [TarTestFileName1, TarTestFileName2]].
[ok, ok]
> erl_tar:create("/tmp/test.tar", [TarTestFileName1, TarTestFileName2]).
ok
>  erl_tar:table("/tmp/test.tar").
{ok,["tmp/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "/tmp/aaaaaaaaaa"]}

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Mar 26, 2024

CT Test Results

    2 files     94 suites   34m 29s ⏱️
2 044 tests 1 996 ✅ 48 💤 0 ❌
2 353 runs  2 303 ✅ 50 💤 0 ❌

Results for commit 0937a06.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Apr 8, 2024
The leading slash where previously dropped from absolute ustar
filename prefixes.
@bjorng bjorng force-pushed the stdlib/erl-tar-abs-filenames-always-keep-leading-slash branch from ee4f766 to 0937a06 Compare April 8, 2024 11:32
@bjorng bjorng added fix testing currently being tested, tag is used by OTP internal CI labels Apr 8, 2024
@bjorng
Copy link
Contributor

bjorng commented Apr 8, 2024

Thanks! I have force-pushed a few modifications of the test case to your branch and added it to our daily builds. If all tests go well it will be included in RC3 of Erlang/OTP 27.

@bjorng bjorng removed the testing currently being tested, tag is used by OTP internal CI label Apr 12, 2024
@bjorng
Copy link
Contributor

bjorng commented Apr 12, 2024

The test case fails on Windows. After a quick look, it seems that there is a separate bug for Windows, possibly in the filename module, not something wrong with your fix or test case. I will take another look next week after the release of RC3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants