mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 13:34:44 -04:00
a?adido c?digo espec?fico para versi?n de mac os x, de forma que el path relativo de los c?mics se almacene adecuadamente en la base de datos
This commit is contained in:
@ -171,7 +171,18 @@ void LibraryCreator::create(QDir dir)
|
|||||||
return;
|
return;
|
||||||
QFileInfo fileInfo = list.at(i);
|
QFileInfo fileInfo = list.at(i);
|
||||||
QString fileName = fileInfo.fileName();
|
QString fileName = fileInfo.fileName();
|
||||||
|
#ifdef Q_WS_MAC
|
||||||
|
QStringList src = _source.split("/");
|
||||||
|
QString filePath = fileInfo.absoluteFilePath();
|
||||||
|
QStringList fp = filePath.split("/");
|
||||||
|
for(int i = 0; i< src.count();i++)
|
||||||
|
{
|
||||||
|
fp.removeFirst();
|
||||||
|
}
|
||||||
|
QString relativePath = "/" + fp.join("/");
|
||||||
|
#else
|
||||||
QString relativePath = QDir::cleanPath(fileInfo.absoluteFilePath()).remove(_source);
|
QString relativePath = QDir::cleanPath(fileInfo.absoluteFilePath()).remove(_source);
|
||||||
|
#endif
|
||||||
if(fileInfo.isDir())
|
if(fileInfo.isDir())
|
||||||
{
|
{
|
||||||
//se a<>ade al path actual el folder, a<>n no se sabe si habr<62> que a<>adirlo a la base de datos
|
//se a<>ade al path actual el folder, a<>n no se sabe si habr<62> que a<>adirlo a la base de datos
|
||||||
|
Reference in New Issue
Block a user