|
@@ -566,6 +566,10 @@
|
|
|
NSString *directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:serverUrl];
|
|
|
if (!directoryID) return;
|
|
|
|
|
|
+ if (totalBytesExpectedToWrite < 1) {
|
|
|
+ totalBytesExpectedToWrite = totalBytesWritten;
|
|
|
+ }
|
|
|
+
|
|
|
float progress = (float) totalBytesWritten / (float)totalBytesExpectedToWrite;
|
|
|
|
|
|
tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataInSessionFromFileName:fileName directoryID:directoryID];
|
|
@@ -987,6 +991,10 @@
|
|
|
NSString *directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:serverUrl];
|
|
|
if (!directoryID) return;
|
|
|
|
|
|
+ if (totalBytesExpectedToSend < 1) {
|
|
|
+ totalBytesExpectedToSend = totalBytesSent;
|
|
|
+ }
|
|
|
+
|
|
|
float progress = (float) totalBytesSent / (float)totalBytesExpectedToSend;
|
|
|
|
|
|
tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataInSessionFromFileName:fileName directoryID:directoryID];
|