Issues

Select view

Select search mode

 
29 of 29

cffile write nameconflict skip

Fixed

Description

When nameconflict is set to skip it is still overwriting. However, on our production systems we have errors in the log that are being raised that indicate that the file already exists - production is on 5.2.1.9
The behaviour of overwriting is occurring on 5.2.4.37
<cffile action="write" output="Check123" file="#expandPath('./')#doiexist.txt" charset="utf-8" nameconflict="skip">

<cfoutput>
#expandPath("./")#doiexist.txt<br>
</cfoutput>

Environment

Linux

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 6 December 2017 at 21:09
Updated 12 February 2019 at 14:16
Resolved 8 October 2018 at 14:23

Activity

Show:

Pat Moody8 December 2017 at 00:55

Overwriting when set to skip or error does not sound correct to me. Same rules should apply to writing a file - whatever the action is. On a clustered server environment a file might be updated from one server whilst doing a check for existence from another. Should the existence return negative and by the time we do a subsequent write on the second server the file may already be there, so we need to skip.

Pothys - MitrahSoft7 December 2017 at 11:00

I've analyzed this ticket & added test case for this ticket. In cffile tag action="write", nameconflict="skip" & nameconflict="error", overwrites the file content same as ACF does. In lucee action="upload" nameConflict working as expected. I think NameConflict work's only for file action = upload, But I'm not sure about that will confirm this issue.

Pull Request: https://github.com/lucee/Lucee/pull/347

Flag notifications