owncloud / ios-library

MIT License
77 stars 90 forks source link

hasServerForbiddenCharactersSupport #99

Closed marinofaggiana closed 8 years ago

marinofaggiana commented 8 years ago

Hi @javiergonzper how are you ? and your work ?? i have a problem with library ... and with moveFileOrFolder, now you have implemented the withForbiddenCharactersSupported, i have in test ownCloud 8.1.1 (stable) i move this file "Fabio Liberatori, l amore e eterno finche dura.mp3" with withForbiddenCharactersSupported:NO but respond with error 110 : The file or folder that you are moving have forbidden characters ... why ? where is forbidden characters in filename ... I'm missing something ? If i move with withForbiddenCharactersSupported:YES it's OK ...

thanks !!

marinofaggiana commented 8 years ago

another problem ... if i call getServerVersionWithPath and then hasServerForbiddenCharactersSupport the hasServerForbiddenCharactersSupport resolve and return hasSupport BOOL value but if i don't call getServerVersionWithPath before , the hasServerForbiddenCharactersSupport return error :

error NSError * domain: @"NSURLErrorDomain" - code: 18446744073709550604

[0] @"NSErrorFailingURLKey" : @"https://cloud.xxxxx.it/status.php"
key __NSCFConstantString * @"NSErrorFailingURLKey" 0x0000000112bd7dc0 value NSURL * @"https://cloud.xxxxx.it/status.php" 0x00007f853c045220

[1] @"NSErrorFailingURLStringKey" : @"https://cloud.xxxx.it/status.php" key NSCFConstantString * @"NSErrorFailingURLStringKey" 0x0000000112bd7de0 value NSCFString * @"https://cloud.xxxxx.it/status.php" 0x00007f853c0451e0

.....

javiergonzper commented 8 years ago

Hello @marinotws, really busy right now :grimacing:, and you?

1) You are getting an error "OCErrorMovingDestinyNameHaveForbiddenCharacters" this is because in the line 350 of the OCCommunication.m the destinyPath contains any forbidden character. Debug there to see what is happening. In UtilsFramework on the method isForbiddenCharactersInFileName is where you are having the problem.

2) It should works... we call to the hasServerForbiddenCharactersSupport without make any call first... or maybe we do any other before but no with that intention.

marinofaggiana commented 8 years ago

ok, @javiergonzper :+1:

     //   if ([fileName characterAtIndex:i] == ','){
     //       thereAreForbidenCharacters = YES;
     //   }

we hope one day we can shaking hands :hand:

javiergonzper commented 8 years ago

Sure! @marinotws maybe the next year in the ownCloud contributor conference :+1: