Skip to content

Commit

Permalink
small change to ensure thread-safety from first inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Nov 27, 2024
1 parent da10dc5 commit e62c017
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -738,13 +738,9 @@ object MosaicRasterGDAL extends RasterReader {
case Some(value) if (value) => OF_READONLY
case _ => OF_THREAD_SAFE
}
driverShortName match {
case Some(driverShortName) =>
val drivers = new JVector[String]()
drivers.add(driverShortName)
gdal.OpenEx(path, openFlags, drivers)
case None => gdal.Open(path, openFlags)
}
val drivers = new JVector[String]()
drivers.add(driverShortName.getOrElse(gdal.IdentifyDriver(path).getShortName))
gdal.OpenEx(path, OF_RASTER | openFlags, drivers)
}

/**
Expand Down

0 comments on commit e62c017

Please sign in to comment.