closed #2920: add a variable to save shared director.