27 Commits

Author SHA1 Message Date
Le Philousophe
f675e643b8 COMMON: Add helper function to parse command-line provided paths 2024-06-15 02:07:38 +02:00
Le Philousophe
b8e08ff2a0 COMMON: Fix Path::baseName
When baseName was called with a base name path but escaped, unescape was
called with the escaping marker while this is not allowed.
2024-05-19 21:18:34 +02:00
Le Philousophe
aceaf99816 COMMON: Fix bug #14892
When both paths were equal, suffix was incremented one char too much and
went off the string.
Add test cases to check for this.
2024-02-02 08:06:59 +01:00
Le Philousophe
61b267759a COMMON: Use hashit, hashit_lower, equalsIgnoreCase on Path string
This change should be safe as our escape system doesn't mess with case.
In addition, we compare underlying strings to check equality so hashing
its content should work too.
2024-01-20 23:20:55 +01:00
Le Philousophe
4f1ccf0ef7 COMMON: Fix fromConfig not using the fixed path under Windows
Instead of using value_ it uses the untouched value.
2024-01-13 17:57:57 +01:00
Le Philousophe
3a80655b45 COMMON: Remove useless unary + in Path lambdas
This confuses poor old MSVC2015 and is not needed.
2024-01-01 11:22:45 +01:00
Le Philousophe
1722511c32 COMMON: Allow to store and fetch paths in configuration 2023-12-24 13:19:25 +01:00
Le Philousophe
eeba7ca153 COMMON: Add more path functions 2023-12-24 13:19:25 +01:00
Le Philousophe
6f46727c77 COMMON: Check if string is puny encoded before trying to decode it
This avoids the following useless conversion String->U32String->String
while the content will not change.
2023-12-24 13:19:25 +01:00
Le Philousophe
be7130f296 COMMON: Rework path storage 2023-12-24 13:19:25 +01:00
Le Philousophe
9260a58d6d COMMON: Make IgnoreCaseAndMac_EqualsTo name consistent with String
Use IgnoreCaseAndMac_EqualTo.
2023-12-24 13:19:25 +01:00
Le Philousophe
f34bef6840 COMMON: Add normalization to Path class 2023-07-09 21:41:58 +02:00
Matthew Duggan
c53b42311d COMMON: Fix path split+join combinations, add tests for same
This resolves multiple scenarios where a path ends up with a trailing
separator.
2022-12-31 17:57:07 +09:00
Vladimir Serbinenko
395aa10644 COMMON: Add missing escaping in Common::Path. 2022-12-20 10:04:55 +01:00
Vladimir Serbinenko
0979c692de COMMON: Add new method joinComponents 2022-12-16 22:59:34 +01:00
Vladimir Serbinenko
a690a034cf COMMON: Remove reliance that \x1f is never part of filename
So far we never encountered such a case but mac disks are notorious for
having non-printable characters in names
2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
673e5e025b COMMON: Remove rawString member for Common::Path 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
7ded5c2de0 COMMON: Move DIR_SEPARATOR into path.cpp 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
4a2e69f990 COMMON: conflate : and / in mac names.
When using mounted images on OSX or with fusehfs : and / are swapped.
When using dumper-companion it encodes / in punycode and preserves it.
2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
ab517cc577 COMMON: Add case-insensitive comparator and hash for Common::Path 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
43d7259ff9 COMMON: Add matchPattern method for Common::Path 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
d02a25230d COMMON: Add appendComponent to Common::Path for convenience 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
af7d9cb850 COMMON: Move punycode_*codepath to path.cpp
This allows to reduce access to DIR_SEPARATOR from outside of Common::Path
2022-12-14 05:08:46 +01:00
Thierry Crozat
f2849282a6 Common: Add functions to decompose a Path into its components 2022-05-24 00:38:02 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
djsrv
763d2813a0 COMMON: Replace Path's += with append/join 2021-08-07 10:44:37 +02:00
djsrv
0db0b2c201 COMMON: Create Path type 2021-08-07 10:44:37 +02:00