Commit c9780ec9 authored by yann300's avatar yann300

fix newFile

parent 61274a31
...@@ -86,7 +86,8 @@ var run = function () { ...@@ -86,7 +86,8 @@ var run = function () {
function createNonClashingName (path) { function createNonClashingName (path) {
var counter = '' var counter = ''
while (files.exists(path + counter)) { if (path.endsWith('.sol')) path = path.substring(0, path.lastIndexOf('.sol'))
while (files.exists(path + counter + '.sol')) {
counter = (counter | 0) + 1 counter = (counter | 0) + 1
} }
return path + counter + '.sol' return path + counter + '.sol'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment