Attempt to solve Bug #2795. review @dinhviethoa

...d added the backend function that changes the rootDirectory