Question about publishing path

My application is located on my dev machine at

~jbenetti/Documents/site-source/tatacentre.ca/admin

using the following code


    $webRoot = Yii::getPathOfAlias('webroot');

    $assetsPath = Yii::app()->getAssetManager()->publish(Yii::app()->basePath.DIRECTORY_SEPARATOR.$this->folder.DIRECTORY_SEPARATOR.$tableName);

    $assets = $webRoot . $assetsPath.'/' . $event->sender->$id;



I get the following output:

Notice that my app is located in a directory within the site root folder

webroot/admin

Why does the assets path contain /admin/

A temp application located in

~jbenetti/Documents/site-source/temp

gives the following output with the same code

It seems to me that it should return a path relative to the entry script.

For now I will just have to hard code my path and hope that I am doing something wrong or that there is a fix upcoming.

Any ideas?

doodle

PS: I know squat about publishing assets but this seems counter intuitive.

I have the same problem…