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

flatten txz file not works when the .DS_Store auto generate #147

Open
Whirlwind opened this issue Nov 13, 2024 · 0 comments
Open

flatten txz file not works when the .DS_Store auto generate #147

Whirlwind opened this issue Nov 13, 2024 · 0 comments

Comments

@Whirlwind
Copy link

I have a issue, when I download a pod which the pod have a same directory in the tar's root directory.

"source" : {
    "http": "https:/xxxx/xxx.txz",
}

I known the downloader will auto flatten the directory, but it not works.

I debug the source code, and print the contents:

if contents.count == 1 && entry.directory?
tmp_entry = entry.sub_ext("#{entry.extname}.tmp")
begin
FileUtils.move(entry, tmp_entry)
FileUtils.move(tmp_entry.children, target_path)
ensure
FileUtils.remove_entry(tmp_entry)
end
end

I found the contents :

[#<Pathname:/var/folders/d1/cvjyjgt107z00lzykk2n81gc0000gn/T/d20241113-25435-1u8clqa/.DS_Store>, 
#<Pathname:/var/folders/d1/cvjyjgt107z00lzykk2n81gc0000gn/T/d20241113-25435-1u8clqa/VideoPlayer>]

The .DS_Store auto generate and it cause the contents.count != 1!!

I mirror the directory:
image

I known the .DS_Store is generate by Finder, but I don't know why it be generate when I not open any finder.

I think we can filter it when we check the count, right?

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

No branches or pull requests

1 participant