Recent

Author Topic: fpexif OneDrive "file not found" issue / patch  (Read 1250 times)

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
fpexif OneDrive "file not found" issue / patch
« on: April 28, 2020, 05:58:55 pm »
Hello,
I found a bug accessing jpg image files stored in OneDive directory with fpexif component.

To fix it I applied the attached patch, please review and apply to lazarus-ccr trunk if ok.

Thank you.

wp

  • Hero Member
  • *****
  • Posts: 7760
Re: fpexif OneDrive "file not found" issue / patch
« Reply #1 on: April 28, 2020, 07:26:02 pm »
Thanks. But I don't know how to reproduce the issue.

I put the new parameter of the "FileExists" function into a {$IF FPC_FullVersion >= 30200} because is does not exist in fpc 3.0.x. Then I copied an image onto my OneDrive. With a right-click on the file and "copy as path" I copied the path to the clipboard and pasted it back into the filename edit of the ExifSimpleDemo example program which is contained in the fpexif installation.

The demo was able to find the image and display its EXIF data when it was compiled with Laz trunk/fpc 3.04 and with Laz trunk/fpc trunk. But the image was also found when I used the unpatched code (with 1-argument FileExists call) with fpc trunk.

So I am a bit lost how to see the issue.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #2 on: April 28, 2020, 09:24:33 pm »
Sorry, I forgot to mention that I'm using Lazarus trunk version compiled with fpc fixes_3_2 branch.

I have problems with "OneDrive for business" version. I confirm right now that it works well with "OneDrive home".

Tomorrow I will do more tests with the ExifSimpleDemo example program.

Thank you for your reply.
« Last Edit: April 28, 2020, 09:37:06 pm by DJMaster »

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #3 on: April 29, 2020, 07:54:03 am »
ExifSimpleDemo.exe fails on my workstation at work accessing "OneDrive for business" files... so I can try to investigate.

wp

  • Hero Member
  • *****
  • Posts: 7760
Re: fpexif OneDrive "file not found" issue / patch
« Reply #4 on: April 29, 2020, 08:34:49 am »
I updated svn with your (slightly modified) patch. Please test, I can't because I do not have access to OneDrive for Business.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #5 on: April 29, 2020, 08:56:50 am »
Now it works with "OneDrive for business" files too, using Lazarus trunk / fpc fixes_3_2 branch. Thank you.

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #6 on: September 01, 2020, 06:34:00 pm »
Please read this message/thread: https://forum.lazarus.freepascal.org/index.php/topic,42155.msg376343.html#msg376343

That patch should fix globally FileExists and all related FPC 3.2.0+ issues with OneDrive for Business files.

wp

  • Hero Member
  • *****
  • Posts: 7760
Re: fpexif OneDrive "file not found" issue / patch
« Reply #7 on: September 01, 2020, 07:27:28 pm »
This patch applies to FPC, not to fpexif. Please file a bug report to BugTracker (link in the left panel of the forum) and attach your patch so that the fpc team can see it. Otherwise it will be lost here.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #8 on: October 12, 2020, 08:21:04 pm »
SymLinks patch has been applied to fpc trunk and fixes_3_2 branch (https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=47100).

Pleaase revert revision 7416 in fpexif lazarus-ccr (https://sourceforge.net/p/lazarus-ccr/svn/7416).
« Last Edit: October 12, 2020, 08:24:17 pm by DJMaster »

wp

  • Hero Member
  • *****
  • Posts: 7760
Re: fpexif OneDrive "file not found" issue / patch
« Reply #9 on: October 13, 2020, 05:47:36 pm »
I reverted that change. Please test and report back (I cannot test myself since I don't have access to OneDrive for Business).
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #10 on: October 14, 2020, 08:09:09 pm »
I reverted that change. Please test and report back (I cannot test myself since I don't have access to OneDrive for Business).

Did you push the revert commit to Lazarus CCR?  ::)

wp

  • Hero Member
  • *****
  • Posts: 7760
Re: fpexif OneDrive "file not found" issue / patch
« Reply #11 on: October 14, 2020, 09:11:27 pm »
Oh I'm sorry... --> r7778
« Last Edit: October 14, 2020, 10:07:51 pm by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

DJMaster

  • New Member
  • *
  • Posts: 44
    • DJMaster on GitHub
Re: fpexif OneDrive "file not found" issue / patch
« Reply #12 on: October 15, 2020, 07:40:19 pm »
Oh I'm sorry... --> r7778

Everything is working fine with OneDrive for Business files, thank you.

 

TinyPortal © 2005-2018