summaryrefslogtreecommitdiffstats
path: root/client-compiler/src
diff options
context:
space:
mode:
authormichael <michael@vaadin.com>2012-12-26 10:26:30 +0200
committermichael <michael@vaadin.com>2012-12-26 10:26:30 +0200
commit0b2e1caca92f64c6ac332bfbafc1846323726c91 (patch)
tree65e7a682d933e8fb4ece3ffa311a2d6d8fd0fddf /client-compiler/src
parentff9c8684698a7c57ea5b040be23c7a883713125a (diff)
downloadvaadin-framework-0b2e1caca92f64c6ac332bfbafc1846323726c91.tar.gz
vaadin-framework-0b2e1caca92f64c6ac332bfbafc1846323726c91.zip
Prevents scss files leaking out into the web content folder when an
exception is thrown during linking (#10594) Change-Id: I6c29b5c08722f5a90095d76c93be3ec949c15c9d
Diffstat (limited to 'client-compiler/src')
-rw-r--r--client-compiler/src/com/vaadin/sass/linker/SassLinker.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/client-compiler/src/com/vaadin/sass/linker/SassLinker.java b/client-compiler/src/com/vaadin/sass/linker/SassLinker.java
index 6aad66fc53..88178ba1d0 100644
--- a/client-compiler/src/com/vaadin/sass/linker/SassLinker.java
+++ b/client-compiler/src/com/vaadin/sass/linker/SassLinker.java
@@ -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());