In the docker-entrypoint.sh script there are the following lines:
|
if [ ! -z "${ROUNDCUBEMAIL_TEMP_DIR}" ]; then |
|
mkdir -p ${ROUNDCUBEMAIL_TEMP_DIR} && chown www-data ${ROUNDCUBEMAIL_TEMP_DIR} |
|
fi |
By checking -z in the conditional, I assume the intention was to execute mkdir/chown only when ROUNDCUBEMAIL_TEMP_DIR is not empty. However, this variable can never be empty because of the following line:
|
: "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}" |
The := operator assigns the default value when the variable is either unset or empty. As a result, it is impossible to disable creation of the temporary directory by setting:
ROUNDCUBEMAIL_TEMP_DIR=""
because the variable is immediately replaced with /tmp/roundcube-temp.
One possible fix would be to use = instead of :=, which would preserve an explicitly empty value while still providing a default when the variable is unset.
Before opening a PR, I wanted to check whether there is a specific reason for the current implementation.
In the docker-entrypoint.sh script there are the following lines:
roundcubemail-docker/apache/docker-entrypoint.sh
Lines 218 to 220 in ce5fe1f
By checking
-zin the conditional, I assume the intention was to executemkdir/chownonly when ROUNDCUBEMAIL_TEMP_DIR is not empty. However, this variable can never be empty because of the following line:roundcubemail-docker/apache/docker-entrypoint.sh
Line 119 in ce5fe1f
The := operator assigns the default value when the variable is either unset or empty. As a result, it is impossible to disable creation of the temporary directory by setting:
ROUNDCUBEMAIL_TEMP_DIR=""because the variable is immediately replaced with
/tmp/roundcube-temp.One possible fix would be to use
=instead of:=, which would preserve an explicitly empty value while still providing a default when the variable is unset.Before opening a PR, I wanted to check whether there is a specific reason for the current implementation.