Thanks Arun PatidarI got the issue but not its fix. Actually, When I
select a folder under the allowed path, it works first time and shows
the button. and then it caches the value. So now, next time "not
allowed" folder is selected, it is still showing button. After
refreshing the screen, it removes the cache and doesn't show button on
"not allowed" folder. Then If I selected allowed path, it does not show
button. So it requires to refresh every time. I have tried your solution
too but it is be...