Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Append slash to folder identifiers #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cweiske
Copy link
Contributor

@cweiske cweiske commented Jan 23, 2024

This patch fixes the problem that fetching a folder via API and using that to upload a file put the file into the wrong folder:

$folder = $storage->getFolder('myfolder');
$storage->addFile('/tmp/file.txt', $folder, 'file.txt');
//created "/myfolderfile.txt" instead of "/myfolder/file.txt"

TYPO3's own
AbstractHierarchicalFilesystemDriver::canonicalizeAndCheckFolderIdentifier appends slashes,
and our createFolder() already returned identifiers with slashes at the end.

Resolves: #146

This patch fixes the problem that fetching a folder via API
and using that to upload a file put the file into the wrong folder:

    $folder = $storage->getFolder('myfolder');
    $storage->addFile('/tmp/file.txt', $folder, 'file.txt');
    //created "/myfolderfile.txt" instead of "/myfolder/file.txt"

TYPO3's own
`AbstractHierarchicalFilesystemDriver::canonicalizeAndCheckFolderIdentifier`
appends slashes,
and our `createFolder()` already returned identifiers with slashes at the end.

Resolves: andersundsehr#146
@weakbit weakbit self-assigned this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Folder identifiers sometimes have / at the end, sometimes not
2 participants