History

switching to the main site progress

elisa-lj11 committed 10 years ago

Commit 49712061 parent c36fc294 files · +16 −13Browse files

Showing the changes to libraries/script-engine/src/FileScriptingInterface.cpp (1 of 4 files). Show all

Unified · Split

libraries/script-engine/src/FileScriptingInterface.cpp+13−7
@@ -80,12 +80,18 @@ void FileScriptingInterface::unzipFile(QString path) { · 79 unmodified lines
8080
8181 //QString zipFileName = QFile::decodeName(compressedFileContent);
8282 QString dirName = dir.path();
83+ QDir testPath("C:/Users/elisa/Downloads/banana.zip");
8384 qDebug() << "Zip directory is stored at: " + dirName;
84− JlCompress::extractDir(&buffer, dirName);
85+ QStringList list = JlCompress::extractDir(testPath.path(), "C:/Users/elisa/Downloads/test");
8586
86− QFileInfoList files = dir.entryInfoList();
87− foreach (QFileInfo file, files) {
88− recursiveFileScan(file, &dirName);
87+ qDebug() << list;
88+
89+ //QFileInfoList files = dir.entryInfoList();
90+ QFileInfoList files = testPath.entryInfoList();
91+ foreach(QFileInfo file, files) {
92+ qDebug() << "My file: " + file.fileName();
93+ recursiveFileScan(file, &dirName);
94+
8995 }
9096
9197
@@ -126,15 +132,15 @@ void FileScriptingInterface::unzipFile(QString path) { · 34 unmodified lines
126132 }
127133
128134 void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) {
129− if (!file.isDir()) {
135+ /*if (!file.isDir()) {
130136 qDebug() << "Regular file logged: " + file.fileName();
131137 return;
132− }
138+ }*/
133139 QFileInfoList files;
134140
135141 if (file.fileName().contains(".zip")) {
142+ qDebug() << "Extracting archive: " + file.fileName();
136143 JlCompress::extractDir(file.fileName());
137− qDebug() << "Extracting archive: " + file.fileName();
138144 }
139145 files = file.dir().entryInfoList();
140146