-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Should be slightly nicer that a segfault, though... Because loading a system font is *probably* something someone would try to do...
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fa5d2ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm.. isn't this kind of overkill? We only care about the prefix of filename after all.
Therefore, wouldn't this do the same thing, without the need for string duplication and extra headers?
Note, because Linux uses case sensitive filepaths, I personally wouldn't try and handle the 'path not exist' error here, as that can (and should) already be handled elsewhere.
Just my two cents.
fa5d2ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it would ;).
You caught that just in time, I was writing the changelog, just about to tag a release ;).
Thanks!
fa5d2ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, yeah, good point on the case sensitivity being useless here, guess I spent too much time wondering how a vfat user partition could bite me in the ass ;).
fa5d2ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering the system partition is ext4, and that's where the system fonts are located....
fa5d2ce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! :)