Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Set metastore files hidden if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanomani committed Sep 29, 2016
1 parent 60db0e6 commit 339a605
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/plugins/metastore.serial/SerialMetaStore.php
Expand Up @@ -319,16 +319,18 @@ protected function saveMetaFileData($ajxpNode, $scope, $userId)
}
$writeMode = "w";
$nodeIsWinLocal = false;
if($scope === AJXP_METADATA_SCOPE_GLOBAL && $this->nodeIsLocalWindowsFS($ajxpNode) && file_exists($metaFile)){
if($scope === AJXP_METADATA_SCOPE_GLOBAL && $this->nodeIsLocalWindowsFS($ajxpNode)) {
$nodeIsWinLocal = true;
$writeMode = "rw+";
if (file_exists($metaFile)) {
$writeMode = "rw+";
}
}
$fp = @fopen($metaFile, $writeMode);
if ($fp !== false) {
@fwrite($fp, serialize(self::$fullMetaCache[$metaFile]), strlen(serialize(self::$fullMetaCache[$metaFile])));
@fclose($fp);
if($nodeIsWinLocal){
$real_path_metafile = TextEncoder::toStorageEncoding(realpath(MetaStreamWrapper::getRealFSReference($metaFile)));
$real_path_metafile = realpath(MetaStreamWrapper::getRealFSReference($metaFile));
if (is_dir(dirname($real_path_metafile))) {
StatHelper::winSetHidden($real_path_metafile);
}
Expand Down

0 comments on commit 339a605

Please sign in to comment.