summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 6403ebf7a..ccc8343f1 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -663,22 +663,24 @@ sub kdeicons_postinstall($) {
sub move_desktop_file($) {
my ($prefix) = @_;
- my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk);
+ my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk FLOPPY.kdelnk CDROM.kdelnk);
foreach (list_skels()) {
my $dir = "$prefix$_";
if (-d "$dir/Desktop") {
- my @toSubst = glob_("$dir/Desktop/.*\.rpmorig");
+ my @toSubst = glob_("$dir/Desktop/*rpmorig");
push @toSubst, "$dir/Desktop/$_" foreach @toMove;
#- remove any existing save in Trash of each user and
#- move appropriate file there after an upgrade.
foreach (@toSubst) {
- my $basename = basename($_);
+ if (-e $_) {
+ my $basename = basename($_);
- unlink "$dir/Desktop/Trash/$basename";
- rename $_, "$dir/Desktop/Trash/$basename";
+ unlink "$dir/Desktop/Trash/$basename";
+ rename $_, "$dir/Desktop/Trash/$basename";
+ }
}
}
}