FileMove() is unable to move a file with the read-only file attribute

Description

The FileMove() function has a difference in behaviour between Lucee and Adobe ColdFusion and Windows O/S.

When the file has the READ-ONLY attribute set, in Lucee it is not possible to move the file as it throws an exception. Windows and Adobe CF both allow the file move in the same circumstance.

The intention of the READ-ONLY attribute is that you cannot write to or modify the file, but should not prevent a move of the file's location.

I believe the issue is in FileTag.java on line 484 - it should not be performing the check on source.isWriteable().

https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/FileTag.java#L484

Assignee

Michael Offner

Reporter

Ben Reid

Labels

Sprint

None

Affects versions

Priority

Major
Configure