]> source.dussan.org Git - vaadin-framework.git/commitdiff
Prevents scss files leaking out into the web content folder when an 53/553/2
authormichael <michael@vaadin.com>
Wed, 26 Dec 2012 08:26:30 +0000 (10:26 +0200)
committermichael <michael@vaadin.com>
Wed, 26 Dec 2012 08:26:30 +0000 (10:26 +0200)
exception is thrown during linking (#10594)

Change-Id: I6c29b5c08722f5a90095d76c93be3ec949c15c9d

client-compiler/src/com/vaadin/sass/linker/SassLinker.java

index 6aad66fc537b92aa3b2751a8772f7279f8ddbd84..88178ba1d0194a80920f455a2f6e4bb65977568d 100644 (file)
@@ -65,6 +65,10 @@ public class SassLinker extends AbstractLinker {
                 // Create the temporary files.
                 String partialPath = resource.getPartialPath();
                 if (partialPath.endsWith(".scss")) {
+                    // In my opinion, the SCSS file does not need to be
+                    // output to the web content folder, as they can't
+                    // be used there
+                    toReturn.remove(resource);
 
                     String fileName = partialPath;
                     File path = tempFolder;
@@ -89,11 +93,6 @@ public class SassLinker extends AbstractLinker {
 
                             // Store the file info for the compilation
                             scssFiles.add(new FileInfo(tempfile, partialPath));
-
-                            // In my opinion, the SCSS file does not need to be
-                            // output to the web content folder, as they can't
-                            // be used there
-                            toReturn.remove(resource);
                         } else {
                             logger.log(TreeLogger.WARN, "Duplicate file "
                                     + tempfile.getPath());