dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
301 stars 58 forks source link

PackageSelector>>#uninstall: endless loop #1164

Closed vince-refiti closed 2 years ago

vince-refiti commented 2 years ago

Describe the bug When uninstalling a user-defined package, the uninstaller gets into a loop and does not return. Dolphin must then be shutdown using the Task Manager. The problem does not happen for standard Dolphin image packages. The packages where this does happen are in a a subfolder of the 'Desktop' folder.

To Reproduce Steps to reproduce the behavior:

  1. Create and install a package.
  2. Uninstall the package.
  3. The spinning cursor is show and Dolphin must be shut down with the Task Manager.

Expected behavior The package is uninstalled.

Screenshots If applicable, add screenshots to help explain your problem.

Please complete the following information):

Additional context PackageSelector>>#uninstall: At the bottom the check for currentFolder notNil is always true and the loop does not exit.

[currentFolder notNil and: [(self filterPresenter selection: currentFolder ifAbsent: []) isNil]] 
        whileTrue: [currentFolder := currentFolder parent]

On my setup, it seems the call currentFolder parent always returns 'C:' if the current folder is 'C:'

vince-refiti commented 2 years ago

File class>>#removePathDelimiter returns 'C:' if the argument is 'C:'

I propose that $: should be included in the path delimiters, i.e.,

File class>>pathDelimiters
  ^ '/\:'