-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errno::ENOENT on expense attachments #3
Comments
Did you manage to get round this? I am getting it, too. |
Looks like it is the filename retrieved from FA and containing a '/' causes it to choke. Just digging in code to see what can be done. |
Yeah... |
Thanks dude. I was thinking of sanitising the URL string to swap characters that would cause a crash to hyphens or similar. Or strip the path from the filename. Still investigating but your input would be really useful! |
yeah, i didn't do anything - not sure if i got round it. kinda gave up in the end i think! |
Aww man, bummer. Ok, well I will post if I have any luck. |
cool, ruby isn't my 1st lang, so i was a bit slow with it... |
Yep, found the cause - filename with slashes: Just working a fix now. |
I did a quick and dirty fix for now, changed line 53 to: This basically sanitises '/' in the filename that could cause it to crash - although I think it would be better if it ditched the excessive path filename, or used regex. |
Here ya go, all fixed: https://github.com/iamkeir/freeagent-receipts Just need to get it merged! |
Apologies for the lack of communication on this. I'll take a look at both of these on Friday and try and get them merged in. Thanks for the contribution 👍 |
:D |
looks good! |
When running, I get an error when it tries to do the expense attachments
(note, this is running using my fork, with the date in the filename - see pull request #2) however, this happened before I made this change too
/private/var/mobile/Applications/7EFCAB78-BCD0-420E-B821-B107FD553270
.. looks suspicious to me?
The text was updated successfully, but these errors were encountered: