Re: Skip .DS_Store files in check_mode_recursive
Re: Skip .DS_Store files in check_mode_recursive
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
On 2026-07-28 Tu 4:53 AM, Andrei Lepikhov wrote: > Hi, > > I am repeatedly encountering an annoying failing test during 'make check-world' > execution on the macOS platform: pg_resetwal with the result: > > Failed test 'check PGDATA permissions' > > It happens because a filesystem object .DS_Store exists in the directory. > AFAIK, MacOS manages it on its own. Given that I almost never touch this module, > it seems the OS handles it automatically. > > A quick dive into the mailing list history shows that this problem has been > discovered [1] and partly fixed [2] before. > > It looks like this approach might be extended to TAP tests too. In the > attachment, see the sketch of the code and a minor test to prove that it works. > > > [1] pg_basebackup: errors on macOS on directories with ".DS_Store" files > https://www.postgresql.org/message-id/flat/E258CE50-AB0E-455D-8AAD-BB4FE8F882FB%40gmail.com > [2] Commit d3fdfdcd1c7 'Skip .DS_Store files in server side utils' Minor perl nit: I don't think you need to say return if basename($File::Find::name) eq '.DS_Store'; you can just say return if $_ eq '.DS_Store'; cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
Re: Skip .DS_Store files in check_mode_recursive
От:
Andrei Lepikhov <lepihov@gmail.com>
Дата:
On 28/07/2026 21:56, Andrew Dunstan wrote: > > On 2026-07-28 Tu 4:53 AM, Andrei Lepikhov wrote: > I don't think you need to say > > return if basename($File::Find::name) eq '.DS_Store'; > > you can just say > > return if $_ eq '.DS_Store'; Thank you, done. I implemented it this way for consistency and to be independent of the value of the 'no_chdir' option. -- regards, Andrei Lepikhov, pgEdge