On 2025-Apr-11, Michael Paquier wrote: > Perhaps we should just use a more centralized place, like file_utils.c > so as all frontends could benefit of it?
I'm not sure about that. This code looks to be making too many assumptions that aren't acceptable for a general routine, such as complaining only that the directory name is long without the possibility that the culprit is the file name. It's more or less okay in current uses because they're all using harcoded short names, but that would not hold in general. At the same time, isn't every call of this routine a potential TOCTTOU bug? Again it's probably fine for the current code, but I wouldn't be too sure about making this generally available as-is. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Oh, great altar of passive entertainment, bestow upon me thy discordant images at such speed as to render linear thought impossible" (Calvin a la TV)