History

Update AssetMappingsScriptingInterface to not open file for activity event

Ryan Huffman committed 9 years ago

Commit 9c120f11 parent ff019d61 file · +2 −6Browse files

Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/AssetMappingsScriptingInterface.cpp+2−6
@@ -105,12 +105,8 @@ void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, · 104 unmodified lines
105 105
106 startedCallback.call();106 startedCallback.call();
107 107
108 QFile file { path };108 QFileInfo fileInfo { path };
109 int64_t size { 0 };109 int64_t size { fileInfo.size() };
110 if (file.open(QIODevice::ReadOnly)) {
111 size = file.size();
112 file.close();
113 }
114 110
115 QString extension = "";111 QString extension = "";
116 auto idx = path.lastIndexOf(".");112 auto idx = path.lastIndexOf(".");