Commit 8ef6842f authored by Travis Nuttall's avatar Travis Nuttall

stop replacing "/" with "_", but remove leading "./" if found

fixes #20
parent 85e2bd12
...@@ -58,7 +58,11 @@ public class RNThreadModule extends ReactContextBaseJavaModule implements Lifecy ...@@ -58,7 +58,11 @@ public class RNThreadModule extends ReactContextBaseJavaModule implements Lifecy
public void startThread(final String jsFileName, final Promise promise) { public void startThread(final String jsFileName, final Promise promise) {
Log.d(TAG, "Starting web thread - " + jsFileName); Log.d(TAG, "Starting web thread - " + jsFileName);
String jsFileSlug = jsFileName.contains("/") ? jsFileName.replaceAll("/", "_") : jsFileName; // When we create the absolute file path later, a "./" will break it.
// Remove the leading "./" if it exists.
String jsFileSlug = jsFileName.contains("./")
? jsFileName.replace("./", "")
: jsFileName;
JSBundleLoader bundleLoader = getDevSupportManager().getDevSupportEnabled() JSBundleLoader bundleLoader = getDevSupportManager().getDevSupportEnabled()
? createDevBundleLoader(jsFileName, jsFileSlug) ? createDevBundleLoader(jsFileName, jsFileSlug)
......
...@@ -148,10 +148,10 @@ android { ...@@ -148,10 +148,10 @@ android {
} }
dependencies { dependencies {
compile project(':react-native-threads')
compile fileTree(dir: "libs", include: ["*.jar"]) compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1" compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-threads')
} }
// Run this once to be able to run the application with BUCK // Run this once to be able to run the application with BUCK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment