-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
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:
cocoapods-downloader/lib/cocoapods-downloader/remote_file.rb
Lines 111 to 119 in e685164
| 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 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?
Metadata
Metadata
Assignees
Labels
No labels
