diff options
| author | Julian Andres Klode <jak@debian.org> | 2024-11-14 19:02:34 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2024-11-14 19:02:34 +0000 |
| commit | 6ee247f4e5130a348c46ed385a0f405f32cc92d4 (patch) | |
| tree | a6eae68423219a297bb41e2a558e885f733fb043 /apt-pkg/contrib | |
| parent | f7fb7fb921c3bbfa0ef086b0cc9343d126d0ed09 (diff) | |
| parent | fdd846cd67def08f04cc616530adc144fc5435d7 (diff) | |
Merge branch 'append' into 'main'
(+=)+= -> append().append()
See merge request apt-team/apt!398
Diffstat (limited to 'apt-pkg/contrib')
| -rw-r--r-- | apt-pkg/contrib/fileutl.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index bd7076701..bb3422bcb 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -755,9 +755,11 @@ string flCombine(string Dir,string File) return File; if (File.length() >= 2 && File[0] == '.' && File[1] == '/') return File; - if (Dir[Dir.length()-1] == '/') - return Dir += File; - return (Dir += '/') += File; + + if (Dir.back() != '/') + Dir.append("/"); + Dir.append(File); + return Dir; } /*}}}*/ // flAbsPath - Return the absolute path of the filename /*{{{*/ |
