Hello,
I'd like to report a wrong behaviour of the
FileExists function with
OneDrive for Business files (I'm not having problems with OneDrive
standard).
As reported in this thread (
https://forum.lazarus.freepascal.org/index.php/topic,49564.msg359694.html#msg359694) I encountered problems accessing files stored into
OneDrive for Business folders. WP solved the fpexif issue applying the following patch:
https://sourceforge.net/p/lazarus-ccr/svn/7416/Today I decided to investigate a bit more about this problem because I encountered the same issue with
INI files and realized that it is a general FPC 3.2.0+ RTL source issue... every unit that uses FileExists is affected.
I created the attached test program (test.pas) to see the differences between FPC 3.0.4 and FPC 3.2.0. Results are displayed into the attached ALP_error.jpg image. The issue is caused by the
L attribute applied to files under OneDrive for Business folder after online synchronization.
Before synchronization, files are marked with AP attributes only, and the issue is not present (look at the attached AP_ok.jpg image), after a few seconds synchronization ends, attribute is set to ALP, and the issue appears (look at the attached ALP_error.jpg image).
I think the problem is inside the new FPC 3.2.0+
FileExists/FileOrDirExists implementation and I'd like to help solving this issue, you can consider me available for testings with OneDrive for Business.
Thank you.