Fix devtools package syncing errors
authorMatthias Schmidt <gravatronics@live.com>
Sat, 24 Nov 2018 14:05:48 +0000 (15:05 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 24 Nov 2018 14:05:48 +0000 (15:05 +0100)
See #2616

wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPip.class.php

index 26f92a9c89f3154e3fd0341412309b94467ac189..6c64cfb01f7178c552752fbd77855364b3ea33c7 100644 (file)
@@ -315,14 +315,12 @@ class DevtoolsPip extends DatabaseObjectDecorator {
                                        break;
                                
                                case 'language':
-                                       $filename = "wcfsetup/install/lang/{$target}";
-                                       $tar->registerFile($filename, $project->path . $filename);
+                                       $tar->registerFile($target, $project->path . 'wcfsetup/install/lang/' . $target);
                                        
                                        break;
                                        
                                default:
-                                       $filename = "com.woltlab.wcf/{$target}";
-                                       $tar->registerFile($filename, $project->path . $filename);
+                                       $tar->registerFile($target, $project->path . 'com.woltlab.wcf/' . $target);
                                        
                                        break;
                        }
@@ -389,12 +387,10 @@ class DevtoolsPip extends DatabaseObjectDecorator {
                                
                                default:
                                        if (strpos($defaultFilename, '*') !== false) {
-                                               $filename = preg_replace('~\*.*$~', $target, $defaultFilename);
-                                               $tar->registerFile($filename, $project->path . $filename);
+                                               $tar->registerFile($target, $project->path . preg_replace('~\*.*$~', $target, $defaultFilename));
                                        }
                                        else {
-                                               $filename = $target;
-                                               $tar->registerFile($filename, $project->path . $filename);
+                                               $tar->registerFile($target, $project->path . $target);
                                        }
                                        
                                        break;