Ignore file size limit for internal data files.
ClosedPublic

Authored by pprkut on Aug 13 2018, 12:11 PM.

Details

Summary

I have an update pending for kdev-php's internal data file,
which would bring it above the 5MB size limit. This code
adds an exception for files inside kdev* related data dirs,
so that the limit doesn't apply for those.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pprkut created this revision.Aug 13 2018, 12:11 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptAug 13 2018, 12:11 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
pprkut requested review of this revision.Aug 13 2018, 12:11 PM
brauch requested changes to this revision.Aug 13 2018, 12:22 PM
brauch added a subscriber: brauch.
brauch added inline comments.
kdevplatform/language/backgroundparser/parsejob.cpp
291

I think you need to compare two canonical paths here, not this. This will break if there are symlinks in the path(s), or something changes about leading or trailing slashes, or e.g. when the user configures his XDG_DATA_DIRS with ../ segments in it or whatever ...

This revision now requires changes to proceed.Aug 13 2018, 12:22 PM
pprkut updated this revision to Diff 39592.Aug 13 2018, 1:09 PM

Compare canonical paths.

brauch accepted this revision.Aug 13 2018, 1:34 PM

Now I would compute the fileInfo's canonicalPath only once (it might require a stat) and then this looks okay :)
I can't accept it apparently because the discussion is still open ...

This revision is now accepted and ready to land.Aug 13 2018, 1:34 PM
pprkut marked an inline comment as done.Aug 13 2018, 2:39 PM

Shows as "Accepted" here, so lot's see :)

This revision was automatically updated to reflect the committed changes.