Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/f319d6086750e1b301801fed76e1f392d357aba7?style=unified&whitespace=ignore-change
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
18 additions and
5 deletions
src/core/UBForeignObjectsHandler.cpp
@ -526,6 +526,10 @@ private:
QString reqExt = element . attribute ( aReqExt ) ;
if ( reqExt = = vReqExt ) { //pdf reference
QString ref = element . attribute ( aHref ) ;
int i = ref . indexOf ( " #page " ) ;
QString dest = ref . replace ( i , ref . length ( ) - i , " " ) ;
if ( ! QFileInfo : : exists ( dest ) )
cureNCopy ( dest , false ) ;
if ( ref . isEmpty ( ) ) {
return ;
}
@ -553,15 +557,24 @@ private:
}
}
QString cureNCopy ( const QString & relativePath )
QString cureNCopy ( const QString & relativePath , bool createNewUuid = true )
{
QString relative = relativePath ;
if ( createNewUuid )
{
QUuid newUuid = QUuid : : createUuid ( ) ;
QString newPath = relative . replace ( QRegExp ( " \\ {.* \\ } " ) , newUuid . toString ( ) ) ;
cp_rf ( mFromDir + " / " + relativePath , mToDir + " / " + newPath ) ;
return newPath ;
}
else
{
cp_rf ( mFromDir + " / " + relativePath , mToDir + " / " + relativePath ) ;
return relativePath ;
}
}
private :
QString mFromDir ;