Explorar o código

Distinguish between \n and \r\n

Ignore newline at EOF for database scheme file - fix for cross-platform compatibility
Felix %!s(int64=2) %!d(string=hai) anos
pai
achega
74d1792392
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/database/database.cpp

+ 1 - 1
src/database/database.cpp

@@ -638,7 +638,7 @@ bool Database::createSchema()
     auto list = filedata.split(';');
 
     // make sure last empty line in sql file has not been parsed
-    if(list.last() == QByteArray("\n"))
+    if(list.last() == QByteArray("\n") || list.last() == QByteArray("\r\n"))
         list.removeLast();
 
     // Create Tables