[MGNLUI-3647] CleanTempFilesCommand can not handle default configured directory Created: 30/Oct/15  Updated: 15/Apr/16  Resolved: 11/Nov/15

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.3.11
Fix Version/s: 5.3.12, 5.4.4

Type: Bug Priority: Neutral
Reporter: Frank Sommer Assignee: AntonĂ­n Juran
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: 0d
Time Spent: 10m
Original Estimate: Not Specified

Issue Links:
Relates
causality
caused by MGNLUI-3542 Temp files are not deleted after use ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Kromeriz 19
Story Points: 2

 Description   

It looks like, that the clean command can not handle with webapp relative directory setting. The following stacktrace appears on every command execution.

15-10-30 12:00:00 ERROR author[DefaultQuartzScheduler_Worker-1]info.magnolia.module.scheduler.CommandJob: Cannot execute
 command cleanTempFiles-null.
java.lang.IllegalArgumentException: Parameter 'directory' is not a directory
        at org.apache.commons.io.FileUtils.validateListFilesParameters(FileUtils.java:545)
        at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:521)
        at org.apache.commons.io.FileUtils.iterateFiles(FileUtils.java:628)
        at info.magnolia.ui.framework.command.CleanTempFilesCommand.execute(CleanTempFilesCommand.java:68)
        at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:81)
        at info.magnolia.commands.MgnlCommand.execute(MgnlCommand.java:70)
        at info.magnolia.module.scheduler.CommandJob.execute(CommandJob.java:135)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)


 Comments   
Comment by Jan Haderka [ 03/Nov/15 ]

Hey Frank,

thanks for the report. It's ok to switch off the command until this issue is resolved. Command and it's execution is one a failsafe to remove the temp files in case someone uploaded some and then killed the browser window or lost connection to the server by some other means, so the only side effect would be that not all temp files will be deleted (during normal execution those files are still handled and removed correctly, t's just the exception flow I described above that would not be clean, so that should be rather rare occurrence).

Generated at Mon Feb 12 09:08:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.