Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Exception raised when tried to put empty files into journal #127

Description

@addiks

When installing DoctrineDBAL, i get an exception that tells me it failed to put a file into the journal:

exception 'Pyrus\IOException' with message 'Unable to copy to DoctrineDBAL/Doctrine/DBAL/README.markdown in /home/gerrit/workspace/IDE/data/Modules/Addiks-Core/Pyrus/Latest/php/.journal-data' in /usr/git/Pyrus.addiks/src/Pyrus/AtomicFileTransaction/Transaction.php:151
Stack trace:
#0 /usr/git/Pyrus.addiks/src/Pyrus/Installer.php(527): Pyrus\AtomicFileTransaction\Transaction->createOrOpenPath('DoctrineDBAL/Do...', Resource id #2733, 420)
#1 /usr/git/Pyrus.addiks/src/Pyrus/Installer.php(328): Pyrus\Installer->install(Object(Pyrus\Package))
#2 /usr/workspace/include_path/Addiks/Core/Service/PyrusAgent.php(141): Pyrus\Installer::commit()
#3 /usr/workspace/include_path/Addiks/Core/Service/Autoloader/Chained.php(131): Addiks\Core\Service_PyrusAgent->installPackage('doctrine/Doctri...')
...
#15 {main}

After looking at it, i see that the file it is trying to put into journal is empty (0 bytes). The method that is performing the copy does also check the count of bytes copied and raises that exception above if 0 (zero) bytes get copied. That way it is impossible to put empty files into journal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions