History

Handle unzip failure

David Rowe committed 9 years ago

Commit dbd00e31 parent fa6f1214 files · +22 −11Browse 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+4−4
@@ -44,13 +44,13 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd) { · 43 unmodified lines
44 }44 }
45 45
46 QString file = unzipFile(path, tempDir);46 QString file = unzipFile(path, tempDir);
47 QString filename = QUrl::fromLocalFile(file).toString();
47 if (file != "") {48 if (file != "") {
48 qDebug() << "Object file to upload: " + file;49 qDebug() << "File to upload: " + filename;
49 QUrl url = QUrl::fromLocalFile(file);
50 emit unzipSuccess(url.toString(), autoAdd);
51 } else {50 } else {
52 qDebug() << "unzip failed";51 qDebug() << "Unzip failed";
53 }52 }
53 emit unzipResult(path, filename, autoAdd);
54}54}
55 55
56// fix to check that we are only referring to a temporary directory56// fix to check that we are only referring to a temporary directory

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t