Kaynağa Gözat

remove field error 404 webDAV

Marino Faggiana 7 yıl önce
ebeveyn
işleme
3b9b0addc3

+ 1 - 1
iOSClient/AppDelegate.m

@@ -304,7 +304,7 @@
 {    
 {    
     [MagicalRecord cleanUp];
     [MagicalRecord cleanUp];
 
 
-    NSLog(@"[LOG] bye bye, Crypto Cloud !");
+    NSLog(@"[LOG] bye bye, Nextcloud !");
 }
 }
 
 
 //
 //

+ 0 - 2
iOSClient/Library/OCCommunicationLib/OCFileDto.h

@@ -46,8 +46,6 @@
 @property (nonatomic, copy) NSString *etag;
 @property (nonatomic, copy) NSString *etag;
 @property (nonatomic, copy) NSString *permissions;
 @property (nonatomic, copy) NSString *permissions;
 @property (nonatomic, copy) NSString *ocId;
 @property (nonatomic, copy) NSString *ocId;
-@property double quotaUsed;
-@property double quotaAvailable;
 @property BOOL isFavorite;
 @property BOOL isFavorite;
 
 
 @end
 @end

+ 4 - 26
iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m

@@ -216,19 +216,8 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
     _requestMethod = @"PROPFIND";
     _requestMethod = @"PROPFIND";
 	NSMutableURLRequest *request = [self requestWithMethod:_requestMethod path:path parameters:nil];
 	NSMutableURLRequest *request = [self requestWithMethod:_requestMethod path:path parameters:nil];
     
     
-    /*
-	NSString *depthHeader = nil;
-	if (depth <= 0)
-		depthHeader = @"0";
-	else if (depth == 1)
-		depthHeader = @"1";
-	else
-		depthHeader = @"infinity";
-    [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
-    */
-    
     [request setValue: depth forHTTPHeaderField: @"Depth"];
     [request setValue: depth forHTTPHeaderField: @"Depth"];
-    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
+    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><id xmlns=\"http://owncloud.org/ns\"/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     
     
     
     
@@ -246,19 +235,8 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
     _requestMethod = @"PROPFIND";
     _requestMethod = @"PROPFIND";
     NSMutableURLRequest *request = [self requestWithMethod:_requestMethod path:path parameters:nil];
     NSMutableURLRequest *request = [self requestWithMethod:_requestMethod path:path parameters:nil];
     
     
-    /*
-    NSString *depthHeader = nil;
-    if (depth <= 0)
-        depthHeader = @"0";
-    else if (depth == 1)
-        depthHeader = @"1";
-    else
-        depthHeader = @"infinity";
-    [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
-    */ 
-    
     [request setValue: depth forHTTPHeaderField: @"Depth"];
     [request setValue: depth forHTTPHeaderField: @"Depth"];
-    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
+    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><id xmlns=\"http://owncloud.org/ns\"/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     
     
     
     
@@ -302,7 +280,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
     
     
     
     
     // OCFileDto
     // OCFileDto
-    body = [body stringByAppendingString:@"<d:resourcetype/><oc:fileid/><d:getcontenttype/><d:getetag/><d:creationdate/><oc:size/><d:getcontentlength/><d:getlastmodified/><oc:id/><oc:permissions/><d:quota-available-bytes/><d:quota-used-bytes/><oc:favorite/>"];
+    body = [body stringByAppendingString:@"<d:resourcetype/><oc:fileid/><d:getcontenttype/><d:getetag/><oc:size/><d:getcontentlength/><d:getlastmodified/><oc:id/><oc:permissions/><oc:favorite/>"];
     
     
     if (dateLastModified.length > 0) {
     if (dateLastModified.length > 0) {
         
         
@@ -357,7 +335,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
     body = @"<?xml version=\"1.0\"?><oc:filter-files xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><d:prop>"; //<oc:id/></d:prop></oc:filter-files>";
     body = @"<?xml version=\"1.0\"?><oc:filter-files xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><d:prop>"; //<oc:id/></d:prop></oc:filter-files>";
     
     
     // OCFileDto
     // OCFileDto
-    body = [body stringByAppendingString:@"<d:resourcetype/><oc:fileid/><d:getcontenttype/><d:getetag/><d:creationdate/><oc:size/><d:getcontentlength/><d:getlastmodified/><oc:id/><oc:permissions/><d:quota-available-bytes/><d:quota-used-bytes/><oc:favorite/>"];
+    body = [body stringByAppendingString:@"<d:resourcetype/><oc:fileid/><d:getetag/><oc:size/><d:getlastmodified/><oc:id/><oc:permissions/><oc:favorite/>"];
     
     
     body = [NSString stringWithFormat:@"%@</d:prop></oc:filter-files>", body];
     body = [NSString stringWithFormat:@"%@</d:prop></oc:filter-files>", body];
     
     

+ 0 - 4
iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLListParser.m

@@ -190,10 +190,6 @@
         _currentFile = [OCFileDto new];
         _currentFile = [OCFileDto new];
 
 
         _xmlBucket = nil;
         _xmlBucket = nil;
-    } else if ([elementName isEqualToString:@"d:quota-used-bytes"]) {
-        _currentFile.quotaUsed = (double)[_xmlChars doubleValue];
-    } else if ([elementName isEqualToString:@"d:quota-available-bytes"]) {
-        _currentFile.quotaAvailable = (double)[_xmlChars doubleValue];
     } else if ([elementName isEqualToString:@"oc:favorite"]) {
     } else if ([elementName isEqualToString:@"oc:favorite"]) {
         _currentFile.isFavorite = [_xmlChars boolValue];
         _currentFile.isFavorite = [_xmlChars boolValue];
     }
     }

+ 0 - 4
iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLParser.m

@@ -235,10 +235,6 @@ NSString *OCCWebDAVURIKey           = @"uri";
         _currentFile = [[OCFileDto alloc] init];
         _currentFile = [[OCFileDto alloc] init];
 
 
         _xmlBucket = nil;
         _xmlBucket = nil;
-    } else if ([elementName isEqualToString:@"d:quota-used-bytes"]) {
-        _currentFile.quotaUsed = (double)[_xmlChars doubleValue];
-    } else if ([elementName isEqualToString:@"d:quota-available-bytes"]) {
-        _currentFile.quotaAvailable = (double)[_xmlChars doubleValue];
     } else if ([elementName isEqualToString:@"oc:favorite"]) {
     } else if ([elementName isEqualToString:@"oc:favorite"]) {
         _currentFile.isFavorite = [_xmlChars boolValue];
         _currentFile.isFavorite = [_xmlChars boolValue];
     }
     }