Skip to content

Commit 0cc3be2

Browse files
committed
fixed error in personality insights with json input
1 parent 3efd6e4 commit 0cc3be2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Scripts/Connection/RESTConnector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
// uncomment to enable debugging
19-
#define ENABLE_DEBUGGING
19+
//#define ENABLE_DEBUGGING
2020

2121
using IBM.Watson.DeveloperCloud.Utilities;
2222
using IBM.Watson.DeveloperCloud.Logging;

Scripts/Services/PersonalityInsights/PersonalityInsights.cs

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public bool GetProfile(OnGetProfile callback, string source,
8686
req.Headers["Accept-Language"] = acceptLanguage;
8787

8888
string normalizedSource = source.Trim().ToLower();
89-
if(Path.GetExtension(normalizedSource).EndsWith(".json"))
89+
if (source.StartsWith(Application.dataPath))
9090
{
9191
string jsonData = default(string);
9292
jsonData = File.ReadAllText(source);

0 commit comments

Comments
 (0)