damoncourtney / installjammer

InstallJammer Multiplatform Installer
http://www.installjammer.com/
Other
32 stars 20 forks source link

Broken symlinks are not uninstalled. #106

Open SergTormozov opened 13 years ago

SergTormozov commented 13 years ago

I run into the problem that broken symlinks are not uninstalled. it may happen for example when link target is uninstalled before symlink. I found that it happens because ![file exists $file] is always true for broken symlinks (see ::InstallJammer::actions::UninstallSelectedFiles) so they are just skipped during uninstall.

So far I corrected the code as follow (in my copy of installjammer)

---- installjammer\lib\Actions\UninstallActions\UninstallSelectedFiles.action ---- --- old --- if {![file exists $file]} { continue } if {[file type $file] eq "directory"} { continue } --new if {[catch {file lstat $file s} error]} { continue }

if {$s(type) eq "directory"} { continue }

Thanks! -- Serg