You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The variables involved are like this: dir == Path(C:\var\lib\transform-service\transforms\interim-article-html) dir.isDirectory == true targetDir = Path(C:\var\lib\transform-service\transforms\interim-article-html__removing_9bf36e05-dd79-4bb5-8f1d-812cabff2e26) targetDir.exists == false
Not all the time, but occasionally I get an Exception which originates from the following stacktrace:
Path(C:\var\lib\transform-service\transforms\interim-article-html\interim-article-html.xslt.json) is not a directory so descendants can not be called on it is not a directory
at scalax.file.NotDirectoryException.scala$util$control$NoStackTrace$$super$fillInStackTrace(Exceptions.scala:59)
at scala.util.control.NoStackTrace$class.fillInStackTrace(NoStackTrace.scala:22)
at scalax.file.NotDirectoryException.fillInStackTrace(Exceptions.scala:59)
at java.lang.Throwable.<init>(Throwable.java:250)
at java.lang.Exception.<init>(Exception.java:54)
at java.io.IOException.<init>(IOException.java:47)
at scalax.file.NotDirectoryException.<init>(Exceptions.scala:59)
at scalax.file.defaultfs.DefaultPath.descendants(DefaultPath.scala:146)
at scalax.file.defaultfs.DefaultPath.descendants(DefaultPath.scala:36)
at scalax.file.Path.children(Path.scala:1159)
at scalax.file.defaultfs.DefaultPath.delete(DefaultPath.scala:111)
at scalax.file.defaultfs.DefaultPath.moveFile(DefaultPath.scala:124)
at scalax.file.Path.moveTo(Path.scala:1102)
at scalax.file.defaultfs.DefaultPath$$anonfun$moveDirectory$1.apply(DefaultPath.scala:138)
at scalax.file.defaultfs.DefaultPath$$anonfun$moveDirectory$1.apply(DefaultPath.scala:137)
at scala.collection.Iterator$class.foreach(Iterator.scala:742)
at scalax.file.BasicPathSet$$anon$1.foreach(path-set.scala:119)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scalax.file.BasicPathSet.foreach(path-set.scala:75)
at scalax.file.defaultfs.DefaultPath.moveDirectory(DefaultPath.scala:137)
at scalax.file.Path.moveTo(Path.scala:1103)
at com.example.LocalTransformsStoreActor$$anonfun$com$example$LocalTransformsStoreActor$$deleteDirAtomic$2.apply(LocalTransformsStoreActor.scala:275)
The first thing to note here is that there is a bug in scalax-file in the method DefaultPath#delete i.e. it should never call children().nonEmpty on a file as that will always throw an Exception, it should only be called on a directory. Here is a PR which addresses the first issue: #99.
The second thing is that this will always fail as a file is not deletable, the wonderful Windows 10 has for some unknown reason decided that it is locked. However when this fails it seems to result in a non-atomic operation i.e. the targetDir was created, but only some of the files were moved over and the dir still exists. Is it the case that atomicMove = true does not work properly?
The text was updated successfully, but these errors were encountered:
My code looks like this:
The variables involved are like this:
dir
== Path(C:\var\lib\transform-service\transforms\interim-article-html)dir.isDirectory
== truetargetDir
= Path(C:\var\lib\transform-service\transforms\interim-article-html__removing_9bf36e05-dd79-4bb5-8f1d-812cabff2e26)targetDir.exists
== falseNot all the time, but occasionally I get an Exception which originates from the following stacktrace:
The first thing to note here is that there is a bug in scalax-file in the method
DefaultPath#delete
i.e. it should never callchildren().nonEmpty
on a file as that will always throw an Exception, it should only be called on a directory. Here is a PR which addresses the first issue: #99.The second thing is that this will always fail as a file is not deletable, the wonderful Windows 10 has for some unknown reason decided that it is locked. However when this fails it seems to result in a non-atomic operation i.e. the
targetDir
was created, but only some of the files were moved over and thedir
still exists. Is it the case thatatomicMove = true
does not work properly?The text was updated successfully, but these errors were encountered: