summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -705,31 +705,38 @@ void TextEdit::openFile( const QString &f ) {
DocLnk sf(f);
filer = sf.file();
break;
};
}
else if(fi.baseName().left(1) == "")
{
qDebug("opening dotfile");
currentFileName=f;
openDotFile(currentFileName);
return;
}
- else
+ /*
+ * The problem is a file where Config(f).isValid() and it does not
+ * end with .desktop will be treated as desktop file
+ */
+ else if (f.find(".desktop",0,true) != -1 )
{
DocLnk sf(f);
filer = sf.file();
if(filer.right(1) == "/")
- filer = f;
+ filer = f;
+
}
+ else
+ filer = f;
DocLnk nf;
nf.setType("text/plain");
nf.setFile(filer);
currentFileName=filer;
nf.setName(fi.baseName());
openFile(nf);
qDebug("openFile string "+currentFileName);
showEditTools();