From f2f396fe25039cc2f353faacfeefa78bd109491c Mon Sep 17 00:00:00 2001 From: Qingyang Hu Date: Sun, 25 Feb 2024 02:54:38 +0000 Subject: [PATCH] Revert "fix migratition errors due to empty submission files" This reverts commit 8941b4453e00354d6a8e46f187cb02f5743cb226. --- webapp/migrations/Version20210407120356.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webapp/migrations/Version20210407120356.php b/webapp/migrations/Version20210407120356.php index 813f1f76f6..06033aebdf 100644 --- a/webapp/migrations/Version20210407120356.php +++ b/webapp/migrations/Version20210407120356.php @@ -42,7 +42,7 @@ public function up(Schema $schema) : void for ($idx = 0; $idx < $zip->numFiles; $idx++) { $filename = basename($zip->getNameIndex($idx)); $content = $zip->getFromIndex($idx); - $encodedContent = ($content === '' ? '0x0A' : ('0x' . strtoupper(bin2hex($content)))); + $encodedContent = ($content === '' ? '' : ('0x' . strtoupper(bin2hex($content)))); // In doubt make files executable, but try to read it from the zip file. $executableBit = '1'; @@ -50,8 +50,7 @@ public function up(Schema $schema) : void && $opsys == ZipArchive::OPSYS_UNIX && (($attr >> 16) & 0100) === 0) { $executableBit = '0'; - } - + } $this->connection->executeStatement( 'INSERT INTO executable_file ' . '(`immutable_execid`, `filename`, `ranknumber`, `file_content`, `is_executable`, `hash`) '