From 5fbf9621f6b538a68009c05e0547dc2263a944e0 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 22 Jun 2015 12:07:15 +0200 Subject: [PATCH] Sketch rename: allowig a case change rename if NOT on windows. Fixes #3305 --- app/src/processing/app/Sketch.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 88e588443..4c091b2b1 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -204,7 +204,7 @@ public class Sketch { // (osx is case insensitive but preserving, windows insensitive, // *nix is sensitive and preserving.. argh) if (renamingCode) { - if (newName.equalsIgnoreCase(current.getCode().getFileName())) { + if (newName.equalsIgnoreCase(current.getCode().getFileName()) && OSUtils.isWindows()) { // exit quietly for the 'rename' case. // if it's a 'new' then an error will occur down below return; @@ -256,7 +256,7 @@ public class Sketch { // extensions, so compare the full names (including extensions). This // might cause problems: http://dev.processing.org/bugs/show_bug.cgi?id=543 for (SketchCode c : data.getCodes()) { - if (newName.equalsIgnoreCase(c.getFileName())) { + if (newName.equalsIgnoreCase(c.getFileName()) && OSUtils.isWindows()) { Base.showMessage(_("Nope"), I18n.format( _("A file named \"{0}\" already exists in \"{1}\""),