-
Iaki Arenaza authored
Instead of using a fixed platform-specific path for temporary image files, create a new temporary directory inside dataroot and place temporary files there. In addition to it, make sure we prefix the profile icon file names with 'mpi_' (stands for mnet profile icon) to prevent clashes (as per Nigel's suggestion) and check the return result from file_put_contents() for errors (but otherwise and continue gracefully if the file can't be written, as Nigel suggested on the bug tracker). While in this particular case the related code takes care of the temporary files, if we are going to have a temp directory, it might be good to have a cronjob to clean it out (We should file a bug to remind us to do that) [Minor whitespace fixups by Nigel] Signed-off-by:
Iñaki Arenaza <iarenaza@eps.mondragon.edu> Signed-off-by:
Nigel McNie <nigel@catalyst.net.nz>
a3d82f91