On the correspondence between path algebras and generalized path algebras