Skip to content

Commit aa1499f

Browse files
Merge pull request SimpleMachines#8987 from Daaaav/fix-some-package-actions
[2.1] Fix `<create-file>`, `<move-file>` and `<move-dir>` in `package-info.xml`
2 parents 21d5cb1 + e7a0fcd commit aa1499f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ function PackageInstallTest()
663663
}
664664

665665
// Don't fail if a file/directory we're trying to create doesn't exist...
666-
if (isset($action['filename']) && !file_exists($file) && !in_array($action['type'], array('create-dir', 'create-file')) && $action['error'] != 'ignore')
666+
if (isset($action['filename']) && !file_exists($file) && !in_array($action['type'], array('create-dir', 'create-file', 'move-dir', 'move-file')) && $action['error'] != 'ignore')
667667
{
668668
$context['has_failure'] = true;
669669

Sources/Subs-Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
13921392
$failure |= !mktree(dirname($action['destination']), 0777);
13931393

13941394
// Create an empty file.
1395-
package_put_contents($action['destination'], package_get_contents($action['source']), $testing_only);
1395+
package_put_contents($action['destination'], '', $testing_only);
13961396

13971397
if (!file_exists($action['destination']))
13981398
$failure = true;

0 commit comments

Comments
 (0)