View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018066 | FPC | RTL | public | 2010-11-27 08:35 | 2012-06-03 00:42 |
Reporter | Ladislav Lacina | Assigned To | Tomas Hajny | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | GO32v2 | OS | GO32v2 | ||
Fixed in Version | 3.0.0 | ||||
Summary | 0018066: case sensitivity for long file name functions? | ||||
Description | In SYSTEM.PP in GO32V2 subdirectory is strange piece of code: LFNSupport:=CheckLFN; if LFNSupport then begin FileNameCaseSensitive:=true; AllFilesMask := '*'; end else AllFilesMask := '*.*'; Are you sure that FileNameCaseSensitive should be TRUE in LFN mode? Sounds strange for me... | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 20897 | ||||
FPCOldBugId | 0 | ||||
FPCTarget | |||||
Attached Files |
|
related to | 0021781 | closed | Michael Van Canneyt | Documentation for newly added FileNameCasePreserving |
|
You're right. The trouble is that FPC RTL currently misuses a single variable (FileNameCaseSensitive) for two different properties - case sensitivity and case preservation. If this variable is set to false, some RTL functions convert all file paths to uppercase to ensure higher compatibility with TP/BP (e.g. FExpand is explicitly defined as converting all paths to uppercase in TP/BP). On the other hand, this behaviour is obviously not wanted when dealing with case preserving systems. We should actually add another variable (FileNameCasePreserving) to all targets, check all code using FileNameCaseSensitive and decide which of the two should be used on individual basis and adapt accordingly. As far as I know, WinXX, LFN enabled DOS, MacOS and OS/2 using LFN enabled partitions are all case preserving but not case sensitive (with some exceptions like case sensitive file systems, e.g. ext2, attached to OS2/ ;-) ). This change is not difficult at all, it just requires some time. Maybe you could supply a patch for this? |
2010-12-01 22:33
|
|
|
OK, I added definitions of FileNameCasePreserve for all targets. As a base I used sources of FPC 2.4.2 However I had nothing to change elsewhere than in SYSTEM.PP, SYSTEM.PAS and OLDLINUX.PP and SYSUNIXH.INC files. Everywhere else I left code untouched because I haven't found place where should be FileNameCasePreserve used. Patch is attached above. |
|
From what version is that RTL? Then I'll generate a diff. |
|
The comment above mentioned 2.4.2 sources... Sorry that I didn't close it for all that long time but it is not just that you could apply it as it is without further effort. Current trunk contains more targets (nativent, wii), i.e. the change needs to be extended beyond the original patch. The proper value of the new constant probably needs to be checked with platform maintainers before applying the patch (e.g. I certainly cannot judge whether gba is case preserving or not). Some tests need to be checked and possibly adapted (at least tests/test/units/dos/tdos2.pp). And obviously the docs need to be adapted too (extend the description of FileNameCaseSensitive, add FileNameCasePreserving and references to that one similarly to existing references to FileNameCaseSensitive plus I found a reference to FileNameCaseSensitive also in user.tex). |
|
Fixed, thanks. Sorry that it took so long - some minor changes to the provided patch were necessary. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-11-27 08:35 | Ladislav Lacina | New Issue | |
2010-11-27 13:22 | Tomas Hajny | Note Added: 0043600 | |
2010-12-01 22:33 | Ladislav Lacina | File Added: patch.ZIP | |
2010-12-01 22:37 | Ladislav Lacina | Note Added: 0043864 | |
2010-12-02 09:05 | Tomas Hajny | Status | new => assigned |
2010-12-02 09:05 | Tomas Hajny | Assigned To | => Tomas Hajny |
2012-01-22 15:37 | Marco van de Voort | Note Added: 0055949 | |
2012-01-22 15:37 | Marco van de Voort | Status | assigned => feedback |
2012-01-22 17:39 | Tomas Hajny | Note Added: 0055952 | |
2012-04-15 23:30 | Tomas Hajny | FPCOldBugId | => 0 |
2012-04-15 23:30 | Tomas Hajny | Fixed in Revision | => 20897 |
2012-04-15 23:30 | Tomas Hajny | Note Added: 0058635 | |
2012-04-15 23:30 | Tomas Hajny | Status | feedback => resolved |
2012-04-15 23:30 | Tomas Hajny | Resolution | open => fixed |
2012-04-15 23:30 | Tomas Hajny | Product Version | 2.4.2 => |
2012-04-15 23:30 | Tomas Hajny | Fixed in Version | => 2.7.1 |
2012-04-16 01:20 | Tomas Hajny | Relationship added | related to 0021781 |
2012-06-03 00:42 | Tomas Hajny | Status | resolved => closed |