----- ~/somedir $ mkdir foo ~/somedir $ echo asdf > foo/bar ~/somedir $ ls foo > bar ~/somedir $ echo "void main() { }" > app.d ~/somedir $ rdmd -offoo app.d ~/somedir $ ls app.d foo foo.635520880476161823-23425.old ----- The "foo.hash.old" is the old folder which was renamed to make place for the 'foo' executable. I don't think RDMD should have the power to move things around like that. It should fail compilation if the output name would overwrite the directory, with optionally providing a special switch for when you really need this behavior (I don't see the point of the feature though..).
Yes please. Have it fail. Will preapprove, thanks.
https://github.com/D-Programming-Language/tools/pull/167 (In reply to Andrej Mitrovic from comment #0) > I don't think RDMD should have the power to move things around like that. It > should fail compilation if the output name would overwrite the directory, > with optionally providing a special switch for when you really need this > behavior (I don't see the point of the feature though..). I added the renaming thing to work around Windows locking executable files that are still running. I just hadn't thought that on Posix executable don't have an extension, and writing the executable file might happen because the output file is actually a directory.
Commits pushed to master at https://github.com/D-Programming-Language/tools https://github.com/D-Programming-Language/tools/commit/7b655a13ce020232b625fabaaea5918fad18fcc2 fix Issue 13758 - RDMD renames directory if -ofNAME is the name of a directory https://github.com/D-Programming-Language/tools/commit/55e5dc6312edbf947cbd775ad34cd25104184c2a Merge pull request #167 from CyberShadow/pull-20150501-053027-13758 fix Issue 13758 - RDMD renames directory if -ofNAME is the name of a dir...
Commits pushed to stable at https://github.com/D-Programming-Language/tools https://github.com/D-Programming-Language/tools/commit/7b655a13ce020232b625fabaaea5918fad18fcc2 fix Issue 13758 - RDMD renames directory if -ofNAME is the name of a directory https://github.com/D-Programming-Language/tools/commit/55e5dc6312edbf947cbd775ad34cd25104184c2a Merge pull request #167 from CyberShadow/pull-20150501-053027-13758