PATCH for LAZRES: remove leading and trailing spaces for filenames in filelist
Original Reporter info from Mantis: ChrisF
-
Reporter name:
Original Reporter info from Mantis: ChrisF
- Reporter name:
Description:
A proposal for a very simple change to remove all leading and trailing spaces for file names, when using a external file list (i.e. '@filelist' argument) for Lazres.
Though space characters are allowed for file names in most of the current OS, having in fine a resource called ' MyResource' and/or a resource type 'MyType ' into a Lazarus resource file will be probably unintended in most cases (well, at least in my case, as I've done the mistake).
Plus, a resource file in filelist with ' MyResource.MyType' as a name (for instance) won't be found if it's real name is in fact 'MyResource.MyType' (i.e. without a leading space). And it's not evident in this error message 'ERROR: file not found: MyResource.MyType', that it doesn't mean that 'MyResource.MyType' is missing, but instead that ' MyResource.MyType' is; just because there are 2 space characters in this part of the error message'...found: MyResource...'.
Just my feelings. Please discard, if inappropriate.