diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-07 20:40:48 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-07 20:40:48 +0200 |
| commit | a0f1e0e9db4b0edee45018c47a08761916af0ce6 (patch) | |
| tree | dc9d05f5772442f61ec913631540b24cf67d5e8a /vfs | |
| parent | ecde167da74c86bc047aaf84c5e548cf65a5da98 (diff) | |
| download | tuxcmd-0.6.38.tar.xz | |
Revised UTF-8 filenames supportv0.6.38
Diffstat (limited to 'vfs')
| -rw-r--r-- | vfs/UVFSCore.pas | 11 | ||||
| -rw-r--r-- | vfs/uVFSprototypes.pas | 5 |
2 files changed, 12 insertions, 4 deletions
diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas index 21fc21b..88277ae 100644 --- a/vfs/UVFSCore.pas +++ b/vfs/UVFSCore.pas @@ -381,7 +381,8 @@ begin // DebugMsg(['Checkpoint 3']); with Item^ do try - AName := strdup(P^.sFileName); + FName := strdup(P^.sFileName); + FDisplayName := StrToUTF8(P^.sFileName); if P^.sLinkTo <> nil then begin LnkPointTo := strdup(P^.sLinkTo); @@ -389,7 +390,7 @@ begin end else LnkPointTo := nil; Mode := P^.iMode; // DebugMsg(['Checkpoint 4']); - IsDotFile := (Length(AName) > 1) and (AName[0] = '.') and (AName[1] <> '.'); + IsDotFile := (Length(FName) > 1) and (FName[0] = '.') and (FName[1] <> '.'); IsDir := TVFSItemType(P^.ItemType) = vDirectory; IsLnk := TVFSItemType(P^.ItemType) = vSymlink; IsBlk := TVFSItemType(P^.ItemType) = vBlockdev; @@ -574,7 +575,8 @@ begin Item := Libc.malloc(SizeOf(TDataItemSL)); Libc.memset(Item, 0, SizeOf(TDataItemSL)); with Item^ do begin - AName := strdup(P^.sFileName); + FName := strdup(P^.sFileName); + FDisplayName := StrToUTF8(P^.sFileName); if P^.sLinkTo <> nil then LnkPointTo := strdup(P^.sLinkTo) else LnkPointTo := nil; ADestination := nil; @@ -633,7 +635,8 @@ var Item: PDataItemSL; with Item^ do begin // AName := Libc.malloc(Length(FPath) + 1); // Libc.memset(AName, 0, Length(FPath) + 1); - AName := strdup(PChar(FPath)); + FName := strdup(PChar(FPath)); + FDisplayName := StrToUTF8(PChar(FPath)); if P^.sLinkTo <> nil then LnkPointTo := strdup(P^.sLinkTo) else LnkPointTo := nil; ADestination := nil; diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas index 7a87aa0..dbc9547 100644 --- a/vfs/uVFSprototypes.pas +++ b/vfs/uVFSprototypes.pas @@ -86,6 +86,11 @@ type ShortBool = boolean; {$ENDIF} + + +// All filenames should be UTF-8 as much as possible + + PVFSItem = ^TVFSItem; TVFSItem = packed record {$IFNDEF CPU64} // 32-bit platform |
