Cleanup after G_TEST_OPTION_ISOLATE_DIRS follows symlinks
A quick report: in a test which uses G_TEST_OPTION_ISOLATE_DIRS
, I created a symbolic link below the temporary directory returned by g_get_user_state_dir()
. I didn't care where it pointed, so I used /
as the target.
This is how I discovered that, when cleaning up the temporary directory, gtestutils.c
's “fairly naive rm -rf
implementation” follows symlinks. I interrupted the process relatively quickly but I will have to compare to my backups to see if I've lost anything!
Of course I should not have created that symlink; but I think the rm_rf
cleanup function should not follow symbolic links.