haxe-rename
haxe-rename copied to clipboard
Wrong rename if initial package name occurs in path on a filesystem several times.
Trying to move file from ./projects/my/src/ec
to the package ec.foo
, found moved file in ./proj/ec/foo/
.
The reason: https://github.com/HaxeCheckstyle/haxe-rename/blob/dd3aa1b10a62edb8e6b0e19508703ee2a6b14bab/src/refactor/rename/RenamePackage.hx#L87
The line
var index:Int = dotPath.lastIndexOf("." + packageName) + 1;
works in this case fine.