Memnarch / Delphinus

An alternative Packagemanager for the Delphi-IDE
Mozilla Public License 2.0
235 stars 64 forks source link

"Install from Folder" function can result in package that cannot be uninstalled #43

Open Pawe1 opened 7 years ago

Pawe1 commented 7 years ago

When source folder name differs from package name, the package cannot be uninstalled properly.

Why? When user installs package via "Install from Folder" button, method TDNSetupCore.GetInstallDirectoryForDirectory returns path based on source folder name.

Result - installation target path is based on source folder name. Uninstaller is looking for "Delphinus.Uninstall.json" file in path based on package name. ...and then uninstallation fails. :boom: :grin:

Pawe1 commented 7 years ago

My guess is that installation destination path should be based on Delphinus.Info.json contents rather than source folder name. Why? Because (I guess) intalling same package twice (= parallel) probably should not be allowed?...

If I am right the proposed fix is here: https://github.com/Pawe1/Delphinus/tree/FixInstallationFromFolder

Memnarch commented 7 years ago

God spot! Thanks, i'll look into it. Don't worry about the stalling pull-requests. I am very busy right now and spend my sparetime a bit differently. maybe i can take a proper look at all of these at the weekend :)

Pawe1 commented 7 years ago

Uhm... Any opinion of this fix proposal? Good / bad / stupid? :stuck_out_tongue:

Memnarch commented 7 years ago

InstallDirectory should work without the need of a package isntance(since that is what you usually just don't have there). I'll look into this problem later, but the current proposed fix does not seem to be the optimal case.