You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2013/02/25 14:41:02 UTC
[10/50] ios commit: [CB-2276] Remove CDVViewController from CDVSound
[CB-2276] Remove CDVViewController from CDVSound
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/53a839cf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/53a839cf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/53a839cf
Branch: refs/heads/multipart_plugin_result
Commit: 53a839cfd9fc44c7c75a16c43c99260584e9ce92
Parents: 70af80b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 14 10:52:47 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 14 11:06:21 2013 -0500
----------------------------------------------------------------------
CordovaLib/Classes/CDVSound.m | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/53a839cf/CordovaLib/Classes/CDVSound.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSound.m b/CordovaLib/Classes/CDVSound.m
index e6f729a..96812ca 100644
--- a/CordovaLib/Classes/CDVSound.m
+++ b/CordovaLib/Classes/CDVSound.m
@@ -18,7 +18,6 @@
*/
#import "CDVSound.h"
-#import "CDVViewController.h"
#import "NSArray+Comparisons.h"
#import "CDVJSON.h"
@@ -44,7 +43,8 @@
NSLog(@"Will use resource '%@' from the Internet.", resourcePath);
resourceURL = [NSURL URLWithString:resourcePath];
} else if ([resourcePath hasPrefix:DOCUMENTS_SCHEME_PREFIX]) {
- filePath = [resourcePath stringByReplacingOccurrencesOfString:DOCUMENTS_SCHEME_PREFIX withString:[NSString stringWithFormat:@"%@/", [CDVViewController applicationDocumentsDirectory]]];
+ NSString* docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
+ filePath = [resourcePath stringByReplacingOccurrencesOfString:DOCUMENTS_SCHEME_PREFIX withString:[NSString stringWithFormat:@"%@/", docsPath]];
NSLog(@"Will use resource '%@' from the documents folder with path = %@", resourcePath, filePath);
} else {
// attempt to find file path in www directory