-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not move to final path in Windows #16
Comments
Thanks for the bug report. |
Thanks for the quick reply. Seems like File.renameTo() is quite unreliable in Windows as you say. FileUtils.moveFile() in the apache.commons.io library might be an alternative. Unfortunately, I don't have the time to look into a patch right now. Since we run a mixed OS project I just have to accept it won't work on my machine for now. I'll see if I can find the time for a patch later. |
Thanks, I appreciate the help. |
So has anyone done a patch for this after all? we have the same issue, and if no-one has started working on it maybe we could create a patch for it |
Hi, thanks for your interest in the plugin. |
Someone on my team made a patch for this: #40 It has been tested on Windows 7 and on MacOs X latest versions and it works. Thanks |
There seems to be a problem with finalizing the file on Windows (Windows 7 Professional 64-bit). The move command fails. On Mac OSX the same code works fine.
Stack trace:
Internal Server Error (500) for request GET /press/js/ZsmbmSbZpEbptzVZoAAqYQJJ.js
Execution exception (In {module:press-1.0.23}/app/press/io/OnDiskCompressedFile.java around line 102)
PressException occured : Successfully wrote compressed file to temporary path C:\Projects\Sourcecode\WebApp\medi
th C:\Projects\Sourcecode\WebApp\media\press-cache\bVyCcFVMmZbLVrEEVkWXaQJJ.js
play.exceptions.JavaExecutionException: Successfully wrote compressed file to temporary path
C:\Projects\Sourcecode\WebApp\media\press-cache\bVyCcFVMmZbLVrEEVkWXaQJJ.js.tmp
But could not move it to final path
C:\Projects\Sourcecode\WebApp\media\press-cache\bVyCcFVMmZbLVrEEVkWXaQJJ.js
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:229)
at Invocation.HTTP Request(Play!)
Caused by: press.PressException: Successfully wrote compressed file to temporary path
C:\Projects\Sourcecode\WebApp\media\press-cache\bVyCcFVMmZbLVrEEVkWXaQJJ.js.tmp
But could not move it to final path
C:\Projects\Sourcecode\WebApp\media\press-cache\bVyCcFVMmZbLVrEEVkWXaQJJ.js
at press.io.OnDiskCompressedFile.close(OnDiskCompressedFile.java:102)
at press.Compressor.writeCompressedFile(Compressor.java:354)
at press.Compressor.getCompressedFile(Compressor.java:323)
at press.Compressor.getCompressedFile(Compressor.java:291)
at press.JSCompressor.getCompressedFile(JSCompressor.java:32)
at controllers.press.Press.getCompressedJS(Press.java:25)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:546)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:500)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:476)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:471)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159)
...
The text was updated successfully, but these errors were encountered: