From 5bc3f2cfa540df92116f4b2542855dce25a00711 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 22 Jan 2012 20:10:23 +0100 Subject: [PATCH] Allow portability of config files between Unix and Windows --- lib/Slic3r/Config.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index eecd4e835..42b7d8026 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -321,8 +321,10 @@ sub load { my $class = shift; my ($file) = @_; + local $/ = "\n"; open my $fh, '<', $file; while (<$fh>) { + s/\R+$//; next if /^\s+/; next if /^$/; next if /^\s*#/;