Sketch rename: allowig a case change rename if NOT on windows. Fixes #3305

This commit is contained in:
Federico Fissore 2015-06-22 12:07:15 +02:00
parent 5d3e4c185e
commit 5fbf9621f6
1 changed files with 2 additions and 2 deletions

View File

@ -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}\""),