Bug: CopyFileEx fails (file exists)

Discuss new features and functions
Posts: 5
Joined: 26 May 2004

mycr0ft

Sorry for the slight imprecise report.
I think this problem surfaced in v5.23, but it still exists in v6.0.
When I copy files to a NAS-shared samba folder, I get errors like

[13:24:46] Info: Creating file "\\DOUBLESTARDS\photo\lightroom\Devices\Android\IMG_20120101_110152.jpg"
[13:24:54] Error: Cannot copy file
"M:\lightroom\Devices\Android\IMG_20120101_110152.jpg" to
"\\DOUBLESTARDS\photo\lightroom\Devices\Android\IMG_20120101_110152.jpg_1.ffs_tmp".
Error Code 80: The file exists. (CopyFileEx)



If I add retries in the configuration, FFS creates multiple files like _1.ffs_tmp, _2, etc. all having size zero bytes.
This is *not* a permission problem, since (1) I have no issue copying the files manually or with different utilities (2) as soon as I click OK, I can delete the ffs_tmp file from the windows machine (i.e. the handle is not held) (3) I checked permissions on the NAS with ssh and they look ok.
If I de-select the "fail-safe copy" in settings, I get a similar error: the original file is overwritten with a 0-length file, but then the copy fails (with a different code, IIRC).

Global settings are: fail-safe copy YES, copy locked files YES, copy NTFS permissions NO.
I run FFS as administrator (i.e. not simply as a user with admin rights).


I upgraded from 5.2x (possibly from 5.20) and never had issues before.
Posts: 5
Joined: 26 May 2004

mycr0ft

Sorry for the slight imprecise report.
I think this problem surfaced in v5.23, but it still exists in v6.0.
When I copy files to a NAS-shared samba folder, I get errors like

[13:24:46] Info: Creating file "\\DOUBLESTARDS\photo\lightroom\Devices\Android\IMG_20120101_110152.jpg"
[13:24:54] Error: Cannot copy file
"M:\lightroom\Devices\Android\IMG_20120101_110152.jpg" to
"\\DOUBLESTARDS\photo\lightroom\Devices\Android\IMG_20120101_110152.jpg_1.ffs_tmp".
Error Code 80: The file exists. (CopyFileEx)



If I add retries in the configuration, FFS creates multiple files like _1.ffs_tmp, _2, etc. all having size zero bytes.
This is *not* a permission problem, since (1) I have no issue copying the files manually or with different utilities (2) as soon as I click OK, I can delete the ffs_tmp file from the windows machine (i.e. the handle is not held) (3) I checked permissions on the NAS with ssh and they look ok.
If I de-select the "fail-safe copy" in settings, I get a similar error: the original file is overwritten with a 0-length file, but then the copy fails (with a different code, IIRC).

Global settings are: fail-safe copy YES, copy locked files YES, copy NTFS permissions NO.
I run FFS as administrator (i.e. not simply as a user with admin rights).


I upgraded from 5.2x (possibly from 5.20) and never had issues before.mycr0ft
I forgot to mention that this error does not happen for *every* folder, but it occurs systematically in some parts of the file system, so I tried deleting everything on the NAS from some point downward, e.g. since I got the error in folder
M:\lightroom\Devices\Android
I deleted the entire \\nas\...\Devices, re-run FFS and re-got the same error again at the same point.