From ebb015a1fb661f86fa38bcff030dd92a3360b6be Mon Sep 17 00:00:00 2001
From: Fabio Bas
Date: Sat, 22 Aug 2009 10:20:49 +0000
Subject: restored .config/KVIrc/log/ as default path for log files (fixes
#371) fixed $file.extractfilename documentation
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3418 17fca916-40b9-46aa-a4ea-0a15b648b75c
---
data/defscript/popups.kvs | 2 +-
src/kvirc/kernel/kvi_app_fs.cpp | 2 +-
src/modules/file/libkvifile.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/defscript/popups.kvs b/data/defscript/popups.kvs
index 265ee36e3..33b91cc78 100644
--- a/data/defscript/popups.kvs
+++ b/data/defscript/popups.kvs
@@ -1181,7 +1181,7 @@ defpopup(logging)
# If this window is being logged actually , $log.file will be non empty
# and pointing to the log file actually open.
- %:logfile = $str.replace($log.file,,$file.localdir)
+ %:logfile = $file.extractfilename($log.file)
}
label($tr("Logging to"):
%:logfile) ("%:logfile" != "")
diff --git a/src/kvirc/kernel/kvi_app_fs.cpp b/src/kvirc/kernel/kvi_app_fs.cpp
index 02f3399da..05642f648 100644
--- a/src/kvirc/kernel/kvi_app_fs.cpp
+++ b/src/kvirc/kernel/kvi_app_fs.cpp
@@ -128,7 +128,7 @@ void KviApp::getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QStrin
szData = szData.remove(szData.length()-1,1);
if(szData.isEmpty())
{
- szData = QDir::homePath();
+ szData = m_szLocalKvircDir;
if(!szData.endsWith(QString(QChar(KVI_PATH_SEPARATOR_CHAR))))
szData.append(KVI_PATH_SEPARATOR_CHAR);
szData.append("log");
diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp
index 2fa8d56ef..e2d420bb1 100644
--- a/src/modules/file/libkvifile.cpp
+++ b/src/modules/file/libkvifile.cpp
@@ -1174,14 +1174,14 @@ static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c)
@short:
Extract the filename from a file path
@syntax:
- $file.extractpath()
+ $file.extractfilename()
@description:
Returns the filename part of the filepath translated to match the current
platform filesystem conventions.[br]
For example, if is /usr/arch/mp3/Carisma_SuonoDelSilenzio.mp3 then
this function will return Carisma_SuonoDelSilenzio.mp3
@seealso:
- [fnc]$file.extractPath[/fnc]
+ [fnc]$file.extractfilename[/fnc]
*/
static bool file_kvs_fnc_extractfilename(KviKvsModuleFunctionCall * c)
--
cgit v1.3.1-10-gc9f91