[Issue 5243] dmd -run potentially removes user files
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 7 10:46:35 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5243
--- Comment #2 from Leandro Lucarella <leandro.lucarella at sociomantic.com> 2013-01-07 10:46:33 PST ---
Can you(In reply to comment #1)
> Created an attachment (id=1170) [details]
> patch
>
> Possible patch added. I don't have a Posix build system to test it, and there
> should be a test-script (possibly in shell) to verify it works ok.
Can you convert this into a pull request? It will make reviewing more easy.
I can write the test case based on the one in the report.
All your changes are POSIX only, is the overwriting not happening on Windows?
Also, is extremely unlikely, but you can still overwrite unintended files, a
check to avoid overwriting anything should be done, but maybe that's much
harder to do because you have to change how the file is opened, not just the
filename.
Finally, any reason for declaring getuid() manually instead of including the
appropriate headers?
Thanks for addressing this issue!
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list