Skip to content

Commit 62afa4f

Browse files
committed
Match on files, not dirs
1 parent c476308 commit 62afa4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function insert($event_name, $data) {
181181
$app->system->chmod($homedir.'/.profile', 0644);
182182
$app->system->chown($homedir.'/.profile', $data['new']['username']);
183183
$app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']);
184-
$profile_content = "if [ -d ~/.bashrc ]
184+
$profile_content = "if [ -f ~/.bashrc ]
185185
then
186186
. ~/.bashrc
187187
fi
@@ -333,7 +333,7 @@ function update($event_name, $data) {
333333
$app->system->chmod($homedir.'/.profile', 0644);
334334
$app->system->chown($homedir.'/.profile', $data['new']['puser']);
335335
$app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']);
336-
$profile_content = "if [ -d ~/.bashrc ]
336+
$profile_content = "if [ -f ~/.bashrc ]
337337
then
338338
. ~/.bashrc
339339
fi

0 commit comments

Comments
 (0)