cordova-plugin-mserviceinterface-2.0 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-mserviceinterface-2.0",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "This plugin establishes the connection to the native interface and performs the requested task.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,4 +25,4 @@
25
25
  "version": ">=5.0.0"
26
26
  }
27
27
  ]
28
- }
28
+ }
package/plugin.xml CHANGED
@@ -2,7 +2,7 @@
2
2
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
3
3
  xmlns:android="http://schemas.android.com/apk/res/android"
4
4
  id="cordova-plugin-mserviceinterface-2.0"
5
- version="1.0.28">
5
+ version="1.0.29">
6
6
  <name>mserviceinterface-2.0</name>
7
7
  <description>This plugin establishes the connection to the native interface and performs the requested task.</description>
8
8
  <author>selfservit@gmail.com</author>
@@ -372,6 +372,7 @@
372
372
 
373
373
  - (void)GetSubDirectoryList:(CDVInvokedUrlCommand *)command {
374
374
  BOOL isDir;
375
+ NSString *resultString = @"";
375
376
  NSMutableDictionary * dict = [[command arguments] objectAtIndex:0];
376
377
  NSString *directory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
377
378
  NSString *contentsPath = [NSString stringWithFormat:@"%@/%@", directory, dict[@"filePath"]];
@@ -381,11 +382,17 @@
381
382
  [contenstMutableArray removeObject:@".DS_Store"];
382
383
  }
383
384
  for(int index = 0; index < [contenstMutableArray count]; index++) {
384
- if (![[NSFileManager defaultManager] fileExistsAtPath:[contentsPath stringByAppendingPathComponent:contenstMutableArray[index]] isDirectory:&isDir] && isDir) {
385
- [contenstMutableArray removeObject:contenstMutableArray[index]];
385
+ if ([[NSFileManager defaultManager] fileExistsAtPath:[contentsPath stringByAppendingPathComponent:contenstMutableArray[index]] isDirectory:&isDir] && isDir) {
386
+ if ([resultString isEqualToString:@""]) {
387
+ resultString = [resultString stringByAppendingString:contenstMutableArray[index]];
388
+ }
389
+ else {
390
+ resultString = [resultString stringByAppendingString:@"|"];
391
+ resultString = [resultString stringByAppendingString:contenstMutableArray[index]];
392
+ }
386
393
  }
387
394
  }
388
- CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:contenstMutableArray];
395
+ CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:resultString];
389
396
  [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
390
397
  }
391
398