Permalink
Browse files

Fix empty path in node case - could create issue in metastore for roo…

…t node. Activate Watch on Whole Workspace.
  • Loading branch information...
1 parent 9d9851b commit 1ba320b23078baf2f44f3df94fb33ae047471514 @cdujeu cdujeu committed Jun 29, 2016
@@ -597,7 +597,7 @@ public function getUrl()
*/
public function getPath()
{
- return $this->urlParts["path"];
+ return !empty($this->urlParts["path"]) ? $this->urlParts["path"] : "/";
}
public function isRoot()
@@ -271,6 +271,7 @@ protected function saveMetaFileData($ajxpNode, $scope, $userId)
$currentFile = $ajxpNode->getUrl();
$repositoryId = $ajxpNode->getRepositoryId();
$fileKey = $ajxpNode->getPath();
+ if(empty($fileKey)) $fileKey = "/";
if (isSet($this->options["METADATA_FILE_LOCATION"]) && $this->options["METADATA_FILE_LOCATION"] == "outside") {
// Force scope
$scope = AJXP_METADATA_SCOPE_REPOSITORY;

0 comments on commit 1ba320b

Please sign in to comment.