Commit 8c3919b2 authored by Romain Reuillon's avatar Romain Reuillon

Test bind destination existance

parent b6b762d3
......@@ -136,10 +136,11 @@ object Singularity {
val absoluteRootFS = (image.file.toScala / FlatImage.rootfsName).toJava.getAbsolutePath
def touchContainerFile(f: String, directory: Boolean) = {
val localFile = new java.io.File((image.file.toScala / FlatImage.rootfsName).toJava, f)
if (!directory) {
localFile.getParentFile.mkdirs()
localFile.toScala.touch()
} else localFile.mkdirs()
if (!localFile.exists())
if (!directory) {
localFile.getParentFile.mkdirs()
localFile.toScala.touch()
} else localFile.mkdirs()
}
touchContainerFile(runFile, false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment