Skip to content

[Analyze] Symlinks in library #199

@letsfindaway

Description

@letsfindaway

As mentioned in OpenBoard-org#1167 (comment), symlinks do not work within the library. I just made a quick check and found:

  • When building the library palette, the file system is scanned in UBFeaturesController::fileSystemScan().
  • This used the function UBFileSystemUtils::allElementsInDirectory():
    QFileInfoList UBFileSystemUtils::allElementsInDirectory(const QString& pDirPath)
    {
    QDir dir = QDir(pDirPath);
    dir.setFilter(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks);
    dir.setSorting(QDir::DirsFirst);
    return QFileInfoList(dir.entryInfoList());
    }
  • Here symlinks are explicitly excluded.

But why? That line in the code dates back to 2011 and was taken from OpenSankore and never modified. Was it intentionally for some specific reason? Analyze this and find out whether we could just remove this flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions