Skip to content

[Local FS] Should attempt to create a directory to the file #99

@asubb

Description

@asubb

Currently, if the file specified in non-existing directory the writer fails:

23:02:14.168 [pool-1-thread-1] ERROR i.w.execution.SingleThreadedOverseer - [io.wavebeans.lib.io.WavPartialFileOutput@7ec50a6f] Error running. Done 5 iterations
java.io.FileNotFoundException: /users/asubb/tmp/wav/record0.wav (No such file or directory)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
	at io.wavebeans.fs.local.LocalWbFileOutputStream.<init>(LocalWbFileOutputStream.kt:8)
	at io.wavebeans.fs.local.LocalWbFile.createWbFileOutputStream(LocalWbFile.kt:16)
	at io.wavebeans.lib.io.FileWriterDelegate.doFinalizeBuffer(FileWriterDelegate.kt:133)
	at io.wavebeans.lib.io.FileWriterDelegate.finalizeBuffer(FileWriterDelegate.kt:96)
	at io.wavebeans.lib.io.AbstractPartialWriter.write(AbstractWriter.kt:136)
	at io.wavebeans.execution.SingleThreadedOverseer$eval$$inlined$map$lambda$1.call(SingleThreadedOverseer.kt:35)
	at io.wavebeans.execution.SingleThreadedOverseer$eval$$inlined$map$lambda$1.call(SingleThreadedOverseer.kt:15)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: java.io.FileNotFoundException: /users/asubb/tmp/wav/record0.wav (No such file or directory)
		at java.io.FileOutputStream.open0(Native Method)
		at java.io.FileOutputStream.open(FileOutputStream.java:270)
		at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
		at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
		at io.wavebeans.fs.local.LocalWbFileOutputStream.<init>(LocalWbFileOutputStream.kt:8)
		at io.wavebeans.fs.local.LocalWbFile.createWbFileOutputStream(LocalWbFile.kt:16)
		at io.wavebeans.lib.io.FileWriterDelegate.doFinalizeBuffer(FileWriterDelegate.kt:133)
		at io.wavebeans.lib.io.FileWriterDelegate.close(FileWriterDelegate.kt:79)
		at io.wavebeans.lib.io.AbstractPartialWriter.close(AbstractWriter.kt:166)
		at kotlin.io.CloseableKt.closeFinally(Closeable.kt:60)
		at io.wavebeans.execution.SingleThreadedOverseer$eval$$inlined$map$lambda$1.call(SingleThreadedOverseer.kt:34)
		... 5 common frames omitted
evaluation finished.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions