Added a check that checks if the old parent folder is the same as the new parent folder.