Commit Graph

46 Commits

Author SHA1 Message Date
ondrej
cfff96f44c FExpand: always uppercase drive letter also in BasePath
git-svn-id: trunk@46353 -
2020-08-10 20:42:13 +00:00
ondrej
34fecf90f3 SysUtils: add ExpandFileName with a BasePath overload
git-svn-id: trunk@43928 -
2020-01-13 12:36:35 +00:00
Jonas Maebe
0f46207776 * fixed (harmless) range error when expanding ~
git-svn-id: trunk@43559 -
2019-11-22 21:11:56 +00:00
pierre
819752c334 Avoid warnings when -v0 is used by using $push/$pop
git-svn-id: trunk@41960 -
2019-04-29 14:19:16 +00:00
Tomas Hajny
62b57e81cd * FExpand / ExpandFileName behaviour updated according to discussion in bug #34166
git-svn-id: trunk@39840 -
2018-09-28 22:57:57 +00:00
Tomas Hajny
23300b8a41 * fix by Charlie correcting treatment of a trailing directory separator on Amiga(-likes)
git-svn-id: trunk@30653 -
2015-04-18 18:29:19 +00:00
Jonas Maebe
74e56c2674 * let GetDirIO() return its result in DefaultFileSystemCodePage, as its only
used internally and in combination with other strings in that code page

git-svn-id: trunk@28571 -
2014-08-31 21:28:01 +00:00
Jonas Maebe
88d969f3bd * ensure that sysutils.expandfilename() returns its result in
DefaultRTLFileSystemCodePage instead of in DefaultFileSystemCodePage
    (mantis #26627)

git-svn-id: trunk@28570 -
2014-08-31 21:27:57 +00:00
Jonas Maebe
df97cd65d9 * don't adjust directory separators in fexpand when we're compiling the
sysutils version, it's already done (in a more efficient way) in
    ExpandFileName() before that routine is called

git-svn-id: branches/cpstrrtl@25301 -
2013-08-19 22:04:19 +00:00
Jonas Maebe
26b7f5a36c * ensure that fexpand(ansistring) never converts its argument to a code page
other than DefaultFileSystemCodePage, so that it can work with strings
    holding any encoding
  + test for fexpand(ansistring) with UTF-8 strings while DefaultSystemCodePage
    is set to CP_ASCII

git-svn-id: branches/cpstrrtl@25300 -
2013-08-19 22:04:15 +00:00
Jonas Maebe
b08d8091b2 * made fexpand unicodestring-safe (use charinset instead of "in" --
"widechar in set" compiles, but results in a runtime conversion of
    the widechar into an ansistring and then getting the first character
    of that ansistring, which is horribly slow -- and Delphi-incompatible,
    but introduced a long time ago because of bug #7758)
  * replaced all "in" operations in sysutils fina.inc with CharInSet for
    the same reason
  * replaced all "string" declarations in finah.inc/fina.inc with "PathStr"
    and "pchar" with "PathPChar", and include them twice in sysutilh.inc/
    sysutils.inc, once with PathStr=UnicodeString/PathPChar=PWideChar and
    once with PathStr=AnsiString/PathPChar=PAnsiChar (not rawbytestring
    because there are several routines with var-parameters and then the
    string type has to match exactly; the "rtlproc" modifier could circumvent
    this, but should be used sparingly, and additionally the routine's
    internals would then first also have to be reviewed to ensure that at
    no point they start mixing in strings with the defaultsystemcodepage
    (e.g. directory separators) without first adjusting their codepage)
  * call GetShortPathNameA or GetShortPathNameW in ExtractShortPathName on
    Windows depending on whether we are parsing the RawByteString/UnicodeString
    version of fina.inc
  + ExpandUNCFileName(unicode) version for Windows, let its
    ExpandUNCFileName(ansistring) call the unicode version (avoid data loss
    due to ansi conversion) and convert the result to
    DefaultRTLFileSystemCodePage (to have no more data loss than what's
    specified by the user)

git-svn-id: branches/cpstrrtl@24999 -
2013-06-27 21:38:10 +00:00
Tomas Hajny
426050cb9f * fix for standalone '~' with HOME=/ on Unix
git-svn-id: trunk@23499 -
2013-01-22 23:56:42 +00:00
Tomas Hajny
d442d14e0c + FileNameCasePreserving added - see #18066 in Mantis
git-svn-id: trunk@20894 -
2012-04-15 20:56:13 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
Tomas Hajny
a2af005101 * fix for web bug #16651
git-svn-id: trunk@15452 -
2010-06-19 16:15:40 +00:00
pierre
a989b6c1e6 * avoid problems for windows if case of drive letter is different
git-svn-id: trunk@14840 -
2010-02-01 15:47:22 +00:00
peter
f4f3ae84d0 * AllowDirectorySeparators and AllowDriveSeparators typed constants
added to allow customization of path and directory parsing in the rtl
  * Use the new sets instead of the hardcoded / and \

git-svn-id: trunk@10105 -
2008-01-29 23:04:56 +00:00
yury
5a49addb35 * fixed more warnings and notes while compiling RTL.
git-svn-id: trunk@4259 -
2006-07-19 19:10:02 +00:00
Tomas Hajny
4d9e404403 * remove GetEnv dependency
git-svn-id: trunk@3729 -
2006-05-28 22:27:27 +00:00
Tomas Hajny
53103216ef * avoid cutting of HOME variable to 255 characters when compiled with $H+ (sysutils)
git-svn-id: trunk@3727 -
2006-05-28 21:40:01 +00:00
florian
098033d56b * part of previous commit
git-svn-id: trunk@3709 -
2006-05-27 21:42:00 +00:00
peter
da85b3db8c * fix linux build
git-svn-id: trunk@3626 -
2006-05-22 06:57:41 +00:00
peter
b5647cff88 * support also ansistring
git-svn-id: trunk@3619 -
2006-05-21 20:16:59 +00:00
Tomas Hajny
88a8aa31d9 * Slight optimization (constant instead of variable in assignment)
git-svn-id: trunk@2747 -
2006-03-04 23:09:06 +00:00
Tomas Hajny
ccbc7717cc * Fix to allow / instead of " fexpand.inc
git-svn-id: trunk@2746 -
2006-03-04 23:05:24 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
Tomas Hajny
af1ab052af + MacOS support 2004-11-21 14:45:17 +00:00
Tomas Hajny
4dbe16c37f * description of individual conditional defines added 2004-05-29 18:25:21 +00:00
Tomas Hajny
c79f0fb1ac * '//' behaviour for Amiga corrected 2002-12-07 16:26:39 +00:00
Tomas Hajny
be27984b3b * Amiga support hopefully finished 2002-12-01 20:46:44 +00:00
Tomas Hajny
5592fb0dae * Amiga fixes (among others) 2002-11-25 21:03:57 +00:00
Tomas Hajny
00bd354f3a * make use of constants available in the system unit 2002-11-24 15:49:22 +00:00
peter
01dfac4a4e * old logs removed and tabs fixed 2002-09-07 15:06:34 +00:00
Tomas Hajny
a0866f619a * fix for bug #1964 merged 2002-05-14 19:25:24 +00:00
carl
891194dd54 * fixes unix conversion of slashes 2002-03-03 15:19:36 +00:00
Tomas Hajny
8a7762efb2 * yet another fix for FExpand under Unix 2001-04-09 19:28:40 +00:00
Tomas Hajny
d5f0038788 * invalid UNC paths handled more consistently to OS/2 and Win32 API functions 2001-04-08 12:47:23 +00:00
Tomas Hajny
a820a0f393 * fix for absolute paths on platforms without drives (*nix), support for long volume names added 2001-04-07 19:37:27 +00:00
Tomas Hajny
f041ede95b * GetDir fixed 2001-03-21 21:08:20 +00:00
Tomas Hajny
0fde4ce207 * one more problem in the Unix part 2001-03-19 21:09:30 +00:00
Tomas Hajny
0d616f2cca * mistyping in the Unix part fixed 2001-03-19 21:05:42 +00:00
Tomas Hajny
c83475a6ca * FExpand without IOResult change, remaining direct asm removed 2001-03-10 09:57:51 +00:00
Tomas Hajny
f46989cf51 + common FExpand introduced 2000-11-06 20:36:17 +00:00