Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc86762a

Browse files
committed
Simplify Perl chmod calls
The Perl chmod function already takes multiple file arguments, so wedon't need a separate looping function.
1 parent119cf76 commitc86762a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

‎src/test/ssl/ServerSetup.pm

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,6 @@ sub copy_files
4343
}
4444
}
4545

46-
# Perform chmod on a set of files, taking into account wildcards
47-
subchmod_files
48-
{
49-
my$mode =shift;
50-
my$file_expr =shift;
51-
52-
my@all_files =glob$file_expr;
53-
foreachmy$file_entry (@all_files)
54-
{
55-
chmod$mode,$file_entry
56-
ordie"Could not run chmod with mode$mode on$file_entry";
57-
}
58-
}
59-
6046
subconfigure_test_server_for_ssl
6147
{
6248
my$tempdir =$_[0];
@@ -82,7 +68,7 @@ sub configure_test_server_for_ssl
8268
# Copy all server certificates and keys, and client root cert, to the data dir
8369
copy_files("ssl/server-*.crt","$tempdir/pgdata");
8470
copy_files("ssl/server-*.key","$tempdir/pgdata");
85-
chmod_files(0600,"$tempdir/pgdata/server-*.key");
71+
chmod(0600,glob"$tempdir/pgdata/server-*.key")ordie$!;
8672
copy_files("ssl/root+client_ca.crt","$tempdir/pgdata");
8773
copy_files("ssl/root+client.crl","$tempdir/pgdata");
8874

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp