Summary: | Hangs/freezes when adding/deleting files in base POT/PO directories | ||
---|---|---|---|
Product: | kbabel | Reporter: | Jure Repinc <jlp> |
Component: | CatalogManager | Assignee: | Stanislav Visnovsky <visnovsky> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | kbabel.defaultproject |
Description
Jure Repinc
2003-09-06 12:36:28 UTC
Can't reproduce. If it freezes, could you attach gdb to the process and send me the backtrace? Sorry I don't know much about gdb so I would like to ask you to tell me what exactly I need to do. No problem: 1. Make catalog manager freeze 2. in xterm/konsole do "ps ax" 3. there is a line like "17726 pts/4 D 0:01 catalogmanager" The first number is the process PID 4. do "gdb -p <catalog manager pid>" 5. after a while, you get a prompt: (gdb) 6. type "bt" and you should get a list similar to the one from the KDE Krash dialog 7. send me the result of the bt. Sorry for being so late with this. I had some other work to do. This is what I get: (gdb) bt #0 0x408038d1 in posix_memalign () from /usr/lib/libkdecore.so.4 #1 0x00000014 in ?? () This is what I get if I try to move a file into the watched folder (the previous output was to move it out): (gdb) bt #0 0x40dcdf41 in QString::setAscii(char const*, int) () from /usr/lib/qt3/lib/libqt-mt.so.3 #1 0x40dc679b in QString::operator=(char const*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #2 0x40051b9b in CatalogManagerView::qt_invoke(int, QUObject*) () from /usr/lib/libcatalogmanager.so.1 #3 0x40b24c58 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt3/lib/libqt-mt.so.3 I tried once agin to move the file out of watched dir and now I also get this: (gdb) bt #0 0x40dc677d in QString::operator=(char const*) () from /usr/lib/qt3/lib/libqt-mt.so.3 #1 0x081f0470 in ?? () #2 0x40051b9b in CatalogManagerView::qt_invoke(int, QUObject*) () from /usr/lib/libcatalogmanager.so.1 #3 0x40b24c58 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt3/lib/libqt-mt.so.3 It seems like a miscompiled code to me. Which mandrake and which RPMs? I use Mandrake 9.2 RC2 with kdebase 3.1.3-78mdk, kdelibs-common 3.1.3-35mdk libqt3 3.1.2-14mdk and kdesdk 3.1.3-9mdk. I now also tried on a completely different computer which has Gentoo Linux installed. I also get a freeze here. I will post gdb output after I emerge it here. (gdb) bt #0 0x411c925c in operator delete[](void*) () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so.5 #1 0x40dedaa7 in QString::deref() () from /usr/qt/3/lib/libqt-mt.so.3 #2 0x40dedb3c in QString::operator=(QString const&) () from /usr/qt/3/lib/libqt-mt.so.3 #3 0x4003fe63 in CatalogManagerView::directoryChanged(QString const&) () from /usr/kde/3.1/lib/libcatalogmanager.so.1 #4 0x40043774 in CatalogManagerView::qt_invoke(int, QUObject*) () from /usr/kde/3.1/lib/libcatalogmanager.so.1 #5 0x40b70299 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/qt/3/lib/libqt-mt.so.3 #6 0x40b70565 in QObject::activate_signal(int, QString) () from /usr/qt/3/lib/libqt-mt.so.3 #7 0x402c810d in KDirWatchPrivate::emitEvent(KDirWatchPrivate::Entry*, int, QString const&) () from /usr/kde/3.1/lib/libkio.so.4 #8 0x402c8419 in KDirWatchPrivate::slotRescan() () from /usr/kde/3.1/lib/libkio.so.4 #9 0x402cab30 in KDirWatchPrivate::qt_invoke(int, QUObject*) () from /usr/kde/3.1/lib/libkio.so.4 #10 0x40b70299 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/qt/3/lib/libqt-mt.so.3 #11 0x40b7013d in QObject::activate_signal(int) () from /usr/qt/3/lib/libqt-mt.so.3 ---Type <return> to continue, or q <return> to quit--- #12 0x40e529db in QTimer::timeout() () from /usr/qt/3/lib/libqt-mt.so.3 #13 0x40b91362 in QTimer::event(QEvent*) () from /usr/qt/3/lib/libqt-mt.so.3 #14 0x40b124c4 in QApplication::internalNotify(QObject*, QEvent*) () from /usr/qt/3/lib/libqt-mt.so.3 #15 0x40b11a3b in QApplication::notify(QObject*, QEvent*) () from /usr/qt/3/lib/libqt-mt.so.3 #16 0x40738809 in KApplication::notify(QObject*, QEvent*) () from /usr/kde/3.1/lib/libkdecore.so.4 #17 0x40aed075 in QEventLoop::activateTimers() () from /usr/qt/3/lib/libqt-mt.so.3 #18 0x40aca8a8 in QEventLoop::processEvents(unsigned) () from /usr/qt/3/lib/libqt-mt.so.3 #19 0x40b262c6 in QEventLoop::enterLoop() () from /usr/qt/3/lib/libqt-mt.so.3 #20 0x40b26168 in QEventLoop::exec() () from /usr/qt/3/lib/libqt-mt.so.3 #21 0x40b126f1 in QApplication::exec() () from /usr/qt/3/lib/libqt-mt.so.3 #22 0x0804af0b in KApplication::staticMetaObject() () #23 0x4123a7a7 in __libc_start_main () from /lib/libc.so.6 I now also tried with KDE 3.2 Beta 1 and the problem is still here :( *** Bug 78864 has been marked as a duplicate of this bug. *** So it still exists. And it is istill here in KDE 3.3.0 Beta 1. What I noticed now is that it only freezes when adding/removing *.pot file into a watched POT folder while Catalog Manager is runing. It seems to be fine when doing the same with *.po files. This is on a completely new computer with Gentoo Linux and I compiled with GCC 3.4.0 for AMD64. OK. I'll try to reproduce via removing POT file. No luck :( Does catalog print any debug information? Try to run it from the console and look for messages. Also, does it start to be responsive again after some time? OK I now started catalogmanager from command line and moved kopete.pot out of watched folder. And no It never becomes responsive again. Here is what the whole console output is from the begining to freezing: catalogmanager: Opened project kbabel.defaultproject kbabel (search): Now using trader for catalogmanager kio (KTrader): KServiceTypeProfile::offers( KBabelDictModule, ) kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-root/ksycoca kio (KTrader): Returning 4 offers kbabel (search): Now for any application kio (KTrader): KServiceTypeProfile::offers( KBabelDictModule, ) kio (KTrader): Returning 4 offers kio (KTrader): KServiceTypeProfile::offers( KDataTool, ) kio (KTrader): Returning 13 offers catalogmanager: setPrefereedWindow set to :0 kio (KDirWatch): Available methods: Stat, FAM, DNotify kio (KDirWatch): Added Dir /root/Translation/POT/kdebase [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 1) for /root/Translation/POT/kdebase catalogmanager: skipping /kdebase/ kio (KDirWatch): Added Dir /root/Translation/POT/kdeedu [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 2) for /root/Translation/POT/kdeedu kio (KDirWatch): Added Dir /root/Translation/POT/kdenetwork [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 3) for /root/Translation/POT/kdenetwork kio (KDirWatch): Added Dir /root/Translation/PO/kdebase [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 4) for /root/Translation/PO/kdebase kio (KDirWatch): Added Dir /root/Translation/PO/kdeedu [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 5) for /root/Translation/PO/kdeedu kio (KDirWatch): Added Dir /root/Translation/PO/kdenetwork [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 6) for /root/Translation/PO/kdenetwork kio (KDirWatch): Added Dir /root/Translation/PO [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 7) for /root/Translation/PO kio (KDirWatch): Added Dir /root/Translation/POT [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 8) for /root/Translation/POT kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdebase (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdeedu (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdebase (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdeedu (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdebase (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdeedu (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdenetwork(now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdebase (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdeedu (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdenetwork (now 1 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdebase (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdeedu (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdebase (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdeedu (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdebase (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdeedu (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdenetwork(now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdebase (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdeedu (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdenetwork (now 1 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdebase (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdeedu (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdebase (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdeedu (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdebase (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdeedu (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/PO/kdenetwork(now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdebase (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdeedu (now 1 watchers) kio (KDirWatch): KDirWatch-1 restarted scanning /root/Translation/POT/kdenetwork (now 1 watchers) kio (KDirWatch): Processing FAM event (FAMDeleted, kopete.pot, Req 3) kio (KDirWatch): Processing FAM event (FAMChanged, kdenetwork, Req 8) kio (KDirWatch): Processing FAM event (FAMDeleted, kopete.pot, Req 3) kio (KDirWatch): KDirWatch-1 emitting dirty /root/Translation/POT/kdenetwork kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdebase (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdeedu (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdebase (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdeedu (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdebase (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdeedu (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/PO/kdenetwork (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdebase (now 0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdeedu (now0 watchers) kio (KDirWatch): KDirWatch-1 stopped scanning /root/Translation/POT/kdenetwork (now 0 watchers) catalogmanager: directory changed: T/kdenetwork/ And I once again tried with GDB and I get this: (gdb) bt #0 0x0000002a985a1d56 in __pthread_alt_unlock (lock=0x2a990ed9f8) at pt-machine.h:68 #1 0x0000002a9859ee5d in *__GI___pthread_mutex_unlock (mutex=0x2a990ed9f8) at mutex.c:199 #2 0x0000002a98afea7e in operator delete(void*) () from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/libstdc++.so.6 #3 0x0000002a98afeab9 in operator delete[](void*) () from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/libstdc++.so.6 #4 0x0000002a97b28f7d in ~QStringData (this=0xbb6490) at qstring.h:363 #5 0x0000002a97b1ecf4 in QString::deref() (this=0x7fbfffe680) at tools/qstring.cpp:1547 #6 0x0000002a97b1ed57 in QString::operator=(QString const&) ( this=0x7fbfffe680, s=@0x7fbfffe6b0) at tools/qstring.cpp:1590 #7 0x00000000004662d6 in CatalogManagerView::directoryChanged(QString const&) (this=0x7bf6d0, dir=@0xbb6120) at catalogmanagerview.cpp:2082 #8 0x0000000000469d97 in CatalogManagerView::qt_invoke(int, QUObject*) ( this=0x7bf6d0, _id=137, _o=0x7fbfffe880) at catalogmanagerview.moc:648 #9 0x0000002a977e5f9c in QObject::activate_signal(QConnectionList*, QUObject*) (this=0x8179b0, clist=0x912d50, o=0x7fbfffe880) at kernel/qobject.cpp:2356 #10 0x0000002a977e6871 in QObject::activate_signal(int, QString) ( this=0x8179b0, signal=2, param= {static null = {static null = <same as static member of an already seen type>, d = 0x5c9930, static shared_null = 0x5c9930}, d = 0x7dd020, static shared_null = 0x5c9930}) at kernel/qobject.cpp:2451 #11 0x0000002a95dcff49 in KDirWatch::dirty(QString const&) (this=0x8179b0, t0=@0x7fbfffe990) at kdirwatch.moc:95 #12 0x0000002a95dcfd29 in KDirWatch::setDirty(QString const&) (this=0x8179b0, _file=@0x7fbfffe990) at kdirwatch.cpp:1431 #13 0x0000002a95dce231 in KDirWatchPrivate::emitEvent(KDirWatchPrivate::Entry*,int, QString const&) (this=0x817a20, e=0x7d99f0, event=1, fileName=@0x5c4548) at kdirwatch.cpp:982 #14 0x0000002a95dce5d6 in KDirWatchPrivate::slotRescan() (this=0x817a20) at kdirwatch.cpp:1069 #15 0x0000002a95dd02a3 in KDirWatchPrivate::qt_invoke(int, QUObject*) ( this=0x817a20, _id=2, _o=0x7fbfffebd0) at kdirwatch_p.moc:88 #16 0x0000002a977e5f9c in QObject::activate_signal(QConnectionList*, QUObject*) (this=0x817ad8, clist=0x958f70, o=0x7fbfffebd0) at kernel/qobject.cpp:2356 #17 0x0000002a977e5dff in QObject::activate_signal(int) (this=0x817ad8, signal=2) at kernel/qobject.cpp:2325 #18 0x0000002a97b94214 in QTimer::timeout() (this=0x817ad8) at .moc/debug-shared-mt/moc_qtimer.cpp:82 #19 0x0000002a97810146 in QTimer::event(QEvent*) (this=0x817ad8, e=0x7fbfffef60) at kernel/qtimer.cpp:219 #20 0x0000002a97779f5b in QApplication::internalNotify(QObject*, QEvent*) ( this=0x7fbffff2c0, receiver=0x817ad8, e=0x7fbfffef60) at kernel/qapplication.cpp:2620 #21 0x0000002a977792a9 in QApplication::notify(QObject*, QEvent*) ( this=0x7fbffff2c0, receiver=0x817ad8, e=0x7fbfffef60) at kernel/qapplication.cpp:2343 #22 0x0000002a96910234 in KApplication::notify(QObject*, QEvent*) ( this=0x7fbffff2c0, receiver=0x817ad8, event=0x7fbfffef60) at kapplication.cpp:495 #23 0x0000002a957fc2b6 in QApplication::sendEvent(QObject*, QEvent*) ( receiver=0x817ad8, event=0x7fbfffef60) at qapplication.h:491 #24 0x0000002a97766267 in QEventLoop::activateTimers() (this=0x715d40) at kernel/qeventloop_unix.cpp:558 #25 0x0000002a97717f7f in QEventLoop::processEvents(unsigned) (this=0x715d40, flags=4) at kernel/qeventloop_x11.cpp:389 #26 0x0000002a97790e64 in QEventLoop::enterLoop() (this=0x715d40) at kernel/qeventloop.cpp:198 #27 0x0000002a97790d61 in QEventLoop::exec() (this=0x715d40) at kernel/qeventloop.cpp:145 #28 0x0000002a9777a0a8 in QApplication::exec() (this=0x7fbffff2c0) at kernel/qapplication.cpp:2743 #29 0x000000000042f62f in main (argc=1, argv=0x7fbffff548) at main.cpp:218 Current language: auto; currently c This is very strange: catalogmanager: directory changed: T/kdenetwork/ Could you, please, send me your kbabel.defaultproject? Created attachment 6878 [details]
kbabel.defaultproject
Here is my kbabel.defaultproject file.
It seems the problem is with the names of the folders. Try other than PO/POT. But I can reproduce is now. You are right. I just renamed PO > pos and POT > pots and now it doesn't freeze anymore. Thanks! It would still be nice to get the freezing with original folder names fixed. That's why I didn't close the bug ;) Is this going to be fixed for KDE 3.4. Just a reminder :) Don't know :( I still can't reproduce the problem :( In comment #20 you said: It seems the problem is with the names of the folders. Try other than PO/POT. But I can reproduce is now. Sorry for confusion. I'll take a look. CVS commit by nanulo: Try harder to find out if PO or POT directory is changed/deleted BUGS: 63791 M +54 -8 catalogmanagerview.cpp 1.98.2.1 --- kdesdk/kbabel/catalogmanager/catalogmanagerview.cpp #1.98:1.98.2.1 @@ -2054,12 +2054,35 @@ void CatalogManagerView::directoryChange _dirWatch->stopScan(); - QString relDir; + QString relDir, relDirPo, relDirPot; if(dir.contains(QRegExp("^"+_settings.poBaseDir))) { - relDir=dir.right(dir.length()-_settings.poBaseDir.length()); + relDirPo=dir.right(dir.length()-_settings.poBaseDir.length()); } - else if(dir.contains(QRegExp("^"+_settings.potBaseDir))) + if(dir.contains(QRegExp("^"+_settings.potBaseDir))) { - relDir=dir.right(dir.length()-_settings.potBaseDir.length()); + relDirPot=dir.right(dir.length()-_settings.potBaseDir.length()); + } + + if( relDirPo.isEmpty() ) + { + // use POT + relDir = relDirPot; + } + else if( relDirPot.isEmpty() ) + { + // use PO + relDir = relDirPo; + } + else + { + // both PO and POT usable, find out the correct one + if( relDirPo.left(1) == "/" ) + { + relDir = relDirPo; + } + else + { + relDir = relDirPot; + } } @@ -2128,12 +2151,35 @@ void CatalogManagerView::directoryDelete _dirWatch->stopScan(); - QString relDir; + QString relDir, relDirPo, relDirPot; if(dir.contains(QRegExp("^"+_settings.poBaseDir))) { - relDir=dir.right(dir.length()-_settings.poBaseDir.length()); + relDirPo=dir.right(dir.length()-_settings.poBaseDir.length()); } - else if(dir.contains(QRegExp("^"+_settings.potBaseDir))) + if(dir.contains(QRegExp("^"+_settings.potBaseDir))) { - relDir=dir.right(dir.length()-_settings.potBaseDir.length()); + relDirPot=dir.right(dir.length()-_settings.potBaseDir.length()); + } + + if( relDirPo.isEmpty() ) + { + // use POT + relDir = relDirPot; + } + else if( relDirPot.isEmpty() ) + { + // use PO + relDir = relDirPo; + } + else + { + // both PO and POT usable, find out the correct one + if( relDirPo.left(1) == "/" ) + { + relDir = relDirPo; + } + else + { + relDir = relDirPot; + } } |