Ftp ioslave: fix 4 character time interpreted as year
ClosedPublic

Authored by linagkar on Dec 13 2019, 8:24 PM.

Details

Summary

Previously, the code checked for years by checking for length 4. However this resulted in dates with single digit hours, e.g. 9:37, being interpreted as years. Thus, it would parse the hour as a year, in this case making it year 9. Now it instead checks for years by checking whether there's a colon.

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
linagkar requested review of this revision.Dec 13 2019, 8:24 PM
linagkar created this revision.
ngraham added a subscriber: ngraham.

Thanks for the patch!

dfaure accepted this revision.Dec 13 2019, 10:15 PM

Looks correct (given the if() further down, not visible in this context-less patch).

Do you have commit access, or do you need someone to land this?

[I wish this parsing code was in a separate class so it could be unittested separately...]

This revision is now accepted and ready to land.Dec 13 2019, 10:15 PM

I learned recently that you can find out if someone has commit rights by doing a find on https://websvn.kde.org/trunk/kde-common/accounts?view=markup.

Looks like no in this case. @linagkar, can we have your email address so we can land the patch with correct authorship information? Thanks!

linagkar added a comment.EditedDec 14 2019, 10:07 AM

My email address is linus.kardell@gmail.com

I'm new to this whole Phabricator thing.

Thanks, you did great! Nice patch too. May it be the first of many. :)

This revision was automatically updated to reflect the committed changes.