aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/MainUI.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index cf5e2fc0..4c41ffda 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -1008,7 +1008,7 @@ void MainUI::ItemSelectionChanged(){
if(sel.length()==1){ itname = sel[0].fileName(); }
bool ok = !itname.isEmpty() && (getCurrentDir()!=QDir::homePath()+"/Desktop");
if(ok){
- ok = !LUtils::isFavorite(sel[0]);
+ ok = !LUtils::isFavorite(sel[0].canonicalFilePath());
}
ui->tool_act_fav->setEnabled(ok);
}
@@ -1403,13 +1403,14 @@ void MainUI::FavoriteItem(){
if(CItem.isEmpty()){
QFileInfoList sel = getSelectedItems();
if(sel.isEmpty()){ return; }
- else{ CItem = sel[0].absoluteFilePath(); }
+ else{ CItem = sel[0].canonicalFilePath(); }
}
- QString fname = CItem;
- QString fullpath = fname;
- fname = fname.section("/",-1); //turn this into just the file name
+ //QString fname = CItem;
+ QString fullpath = CItem;
+ /*fname = fname.section("/",-1); //turn this into just the file name
if(QFile::exists(favdir+fname)){ QFile::remove(favdir+fname); } //remove the stale link
- QFile::link(fullpath, favdir+fname);
+ QFile::link(fullpath, favdir+fname);*/
+ LUtils::addFavorite(fullpath);
CItem.clear();
ItemSelectionChanged();
}
bgstack15