Skip to content

Commit

Permalink
Fix zarr zip paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
milos.colic committed Feb 13, 2024
1 parent fa80aab commit 5a85ef9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ object MosaicRasterGDAL extends RasterReader {
// the way we zip using uuid is not compatible with GDAL
// we need to unzip and read the file if it was zipped by us
val parentDir = Paths.get(zippedPath).getParent
val prompt = SysUtils.runScript(Array("/bin/sh", "-c", s"cd $parentDir && unzip -o $zippedPath -d /"))
val prompt = SysUtils.runScript(Array("/bin/sh", "-c", s"cd $parentDir && unzip -o $zippedPath -d $parentDir"))
// zipped files will have the old uuid name of the raster
// we need to get the last extracted file name, but the last extracted file name is not the raster name
// we can't list folders due to concurrent writes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object FileUtils {
bytes
}

def createMosaicTempDir(prefix: String = ""): String = {
def createMosaicTempDir(prefix: String = "/tmp"): String = {
val tempRoot = Paths.get(s"$prefix/mosaic_tmp/")
if (!Files.exists(tempRoot)) {
Files.createDirectories(tempRoot)
Expand Down

0 comments on commit 5a85ef9

Please sign in to comment.