summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 1c95a97..b875228 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -711,19 +711,26 @@ void TextEdit::openFile( const QString &f ) {
711 { 711 {
712 qDebug("opening dotfile"); 712 qDebug("opening dotfile");
713 currentFileName=f; 713 currentFileName=f;
714 openDotFile(currentFileName); 714 openDotFile(currentFileName);
715 return; 715 return;
716 } 716 }
717 else 717 /*
718 * The problem is a file where Config(f).isValid() and it does not
719 * end with .desktop will be treated as desktop file
720 */
721 else if (f.find(".desktop",0,true) != -1 )
718 { 722 {
719 DocLnk sf(f); 723 DocLnk sf(f);
720 filer = sf.file(); 724 filer = sf.file();
721 if(filer.right(1) == "/") 725 if(filer.right(1) == "/")
722 filer = f; 726 filer = f;
727
723 } 728 }
729 else
730 filer = f;
724 731
725 DocLnk nf; 732 DocLnk nf;
726 nf.setType("text/plain"); 733 nf.setType("text/plain");
727 nf.setFile(filer); 734 nf.setFile(filer);
728 currentFileName=filer; 735 currentFileName=filer;
729 736