Revision: 5788
Author: [email protected]
Date: Fri Jul 24 11:33:26 2009
Log: Fixes JsStackEmulator#baseName() so it handles urls and file system  
urls.  Bob came up with the code.

Patch by: bobv, jlabanca
Review: TBR
http://code.google.com/p/google-web-toolkit/source/detail?r=5788

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java      Thu Jul 
 
23 13:45:16 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java      Fri Jul 
 
24 11:33:26 2009
@@ -684,7 +684,12 @@
       * Strips off the final name segment.
       */
      private String baseName(String fileName) {
+      // Try the system path separator
        int lastIndex = fileName.lastIndexOf(File.separator);
+      if (lastIndex == -1) {
+        // Otherwise, try URL path separator
+        lastIndex = fileName.lastIndexOf('/');
+      }
        if (lastIndex != -1) {
          return fileName.substring(lastIndex + 1);
        } else {


--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to