question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extract SAFE products without intermediate directory

See original GitHub issue

Describe the bug Extraction is adding a useless subdirectory, example: extracting my_data/S2A_MSIL1C_20180619T132231_N0206_R038_T22KGV_20180619T150922.zip leads to my_data/S2A_MSIL1C_20180619T132231_N0206_R038_T22KGV_20180619T150922/S2A_MSIL1C_20180619T132231_N0206_R038_T22KGV_20180619T150922.SAFE

In order to be coherent with unzipping outside eodag, e.g. unzip S2A_MSIL1C_20180619T132231_N0206_R038_T22KGV_20180619T150922.zip, in my opinion it would be preferable to lead to my_data/S2A_MSIL1C_20180619T132231_N0206_R038_T22KGV_20180619T150922.SAFE.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sbrunatocommented, Apr 22, 2021

@sbrunato , is there any particular reason why an intermediate directory (product.properties[title]) has to be created?

For homogeneity purpose

@sbrunato what you are saying is that it is not possible to get/build the root directory of the zip file from the search result properties?

It is possible, but for now we use f"{outputs_prefix}/{product.properties[title]}" as destination by default for all providers / product types.

This can be updated, but before we’ll have to check how it may impact other users and projects using eodag.

@floriandeboissieu we’ll keep you informed in this issue if we update this sub-directories behavior

1reaction
LucHermittecommented, May 9, 2022

This can be updated, but before we’ll have to check how it may impact other users and projects using eodag.

This would definitively simplify things for S1Tiling.

We just had another request for a direct support of external products downloaded by end-users without the redundant directory. Supporting it would definitively convolute our code base to do eodag job of not downloading what is already there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extract files from zip without keeping the structure using ...
I want all the files from subfolders extract in only one folder without keeping the original structure. At the moment, I extract all,...
Read more >
How to untar an archive without the root folder, but keeping ...
Easy. Just use --strip-components=1 on the archive like this: tar -xf archive.tar --strip-components=1. And as explained in the official tar ...
Read more >
creating a tar archive without including parent directory
I am trying to create a graphical program for my script. Inside the script I use tar to create a tar archive. From...
Read more >
Zip an archive without including parent directory - Ask Ubuntu
So if I understand correctly, you are trying to archive the files & folders in a particular folder but without including the root...
Read more >
Zip and unzip files - Microsoft Support
To unzip all the contents of the zipped folder, press and hold (or right-click) the folder, select Extract All, and then follow the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found