fix FB configurator

Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2948284b
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2948284b
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2948284b

Branch: refs/heads/maven
Commit: 2948284b5eafb2a467d7a478f93277eef8b3559c
Parents: 79b5a34
Author: Alex Harui <aha...@apache.org>
Authored: Thu Jun 12 11:51:18 2014 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Thu Jun 12 11:51:18 2014 -0700

----------------------------------------------------------------------
 .../compiler/internal/config/FlashBuilderConfigurator.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2948284b/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
----------------------------------------------------------------------
diff --git 
a/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
 
b/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
index 2949147..fce815e 100644
--- 
a/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
+++ 
b/compiler/src/org/apache/flex/compiler/internal/config/FlashBuilderConfigurator.java
@@ -289,13 +289,15 @@ public class FlashBuilderConfigurator
                             {
                                 if (workspacePath == null)
                                 {
-                                    workspacePath = path;
+                                    workspacePath = source;
+                                    File workspaceFile = new File(source);
+                                    workspacePath = workspaceFile.getParent();
                                     while (workspacePath != null && 
workspacePath.length() > 0)
                                     {
-                                        File workspaceFile = new 
File(workspacePath + "/.metadata");
+                                        workspaceFile = new File(workspacePath 
+ "/.metadata");
                                         if (workspaceFile.exists())
                                             break;
-                                        workspacePath = 
workspaceFile.getParent();
+                                        workspacePath = 
workspaceFile.getParentFile().getParent();
                                     }
                                 }
                                 path = path.replace("${DOCUMENTS}", 
workspacePath);

Reply via email to