mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Fix NullPointerException in update of public shares while keeping compatibility of the operation with servers not supporting 'name' property in shares
This commit is contained in:
		
							parent
							
								
									a034338290
								
							
						
					
					
						commit
						c9a06fc5e4
					
				| @ -168,7 +168,7 @@ public class UpdateRemoteShareOperation extends RemoteOperation { | |||||||
| 
 | 
 | ||||||
|         /// prepare array of parameters to update |         /// prepare array of parameters to update | ||||||
|         List<Pair<String, String>> parametersToUpdate = new ArrayList<>(); |         List<Pair<String, String>> parametersToUpdate = new ArrayList<>(); | ||||||
|         if (mName.length() > 0) { |         if (mName != null) { | ||||||
|             parametersToUpdate.add(new Pair<>(PARAM_NAME, mName)); |             parametersToUpdate.add(new Pair<>(PARAM_NAME, mName)); | ||||||
|         } |         } | ||||||
|          |          | ||||||
| @ -236,7 +236,11 @@ public class UpdateRemoteShareOperation extends RemoteOperation { | |||||||
|                 } else { |                 } else { | ||||||
|                     result = new RemoteOperationResult(false, put); |                     result = new RemoteOperationResult(false, put); | ||||||
|                 } |                 } | ||||||
|                 if (!result.isSuccess()) { |                 if (!result.isSuccess() && | ||||||
|  |                     !PARAM_NAME.equals(parameter.first) | ||||||
|  |                         // fail in "name" parameter will be ignored; requires OCX, will fail | ||||||
|  |                         // fails in previous versions | ||||||
|  |                     ) { | ||||||
|                     break; |                     break; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user