Re: [hatari-devel] Doing Hatari 2.6.1 release -> trailing / in directory |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx, oak@xxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Doing Hatari 2.6.1 release -> trailing / in directory
- From: Andreas Grabher <andreas_g86@xxxxxxxxxx>
- Date: Tue, 29 Jul 2025 20:39:53 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=rx+iAm/hWK5A/ZUxCmIOk0x1Fmdi9CC9MaXqAINVkMU=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To:x-icloud-hme; b=aRzBREvzXE6ppRQ4vRmEGIDZZSc6M5FLRNeL7OWStmBCc4jlEGd5BjI1QPTe+u1eX5vX6q1w2EuF0ltPjA+7jZJ9JUQMrqnn47kT2xNA6b7KrlnsjJ2dcJAsaKvv7B0Pnwyxj7uWcx8XrIOPI20oOue2+64v8GWs4wka/Oklz5tF0QxITvmIXbf+jGabrtywMq1j3UMjFZBqVZWyARdEJ0OJxO4jucHZHke3gntrAY83egJMGWw33i7in7TnF5EhUlmzh01JkIXC7sj3mbbJ7v50fAsPG+LFWt0ZyZtXRBVnQuSFCvWVwCKJ/sZioaEX+bkzcPYQZFiVw/zvTsdu7A==
> Am 29.07.2025 um 20:20 schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
>
> Hi,
>
> > File_AddSlashToEndFileName() is also called from dlgFileSelect.c to add a trailing / (or \) to directory.
> >
> > I don't know why it was made that way, adding a trailing '/' to dir name doesn't look useful at first sight, because later dir and file are concatened with things like "%s%c%s" with %c being PATHSEP.
> >
> > I'd rather not touch this part of the code unless someone can explain why it was made that way.
>
> One possible reason could be differentiating between file and directory names, potentially in cases where paths could refer to things that do not necessarily exist as-is on the host file system (file selector supports e.g. selecting paths inside ZIP files).
>
> Because impact of such change is not isolated, and may diff between OSes & C-libraries, I think finding all (potential) issues with such change (mainly missing separators) can take rather long. I.e. I think it should be done at start of major release cycle, not in a fix release.
>
> I think such change should be done together with writing a policy on how file paths _should_ be handled within Hatari code, and review that all path handling all over Hatari code conforms to such policy.
>
>
> - Eero
Okay, that makes sense. Thank you for looking into that.
Andreas