/**
  * walk up the users file tree and update the etags
  * @param string $user
  * @param string $path
  */
 private static function correctUsersFolder($user, $path)
 {
     // $path points to the mount point which is a virtual folder, so we start with
     // the parent
     $path = '/files' . dirname($path);
     \OC\Files\Filesystem::initMountPoints($user);
     $view = new \OC\Files\View('/' . $user);
     if ($view->file_exists($path)) {
         while ($path !== dirname($path)) {
             $etag = $view->getETag($path);
             $view->putFileInfo($path, array('etag' => $etag));
             $path = dirname($path);
         }
     } else {
         \OCP\Util::writeLog('files_sharing', 'can not update etags on ' . $path . ' for user ' . $user . '. Path does not exists', \OCP\Util::DEBUG);
     }
 }