www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7223] New: Access violation when using rmdirRecurse on folder without modify permissions

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7223

           Summary: Access violation when using rmdirRecurse on folder
                    without modify permissions
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: Jesse.K.Phillips+D gmail.com



13:54:27 PST ---
On Windows if you do not have permissions to modify a folder (i.e. delete it)
then the program will crash with an Access Violation instead of throwing a
FileException. I tried adding writeln statements to try and narrow down the
code and instead I end up with an infinite loop. Interesting bits below.

=== Bypassed ===
std.file.FileException std\file.d(551): C:\New folder\New Text Document.txt:
Acc
ess is denied.
----------------
436098
435F0F
403296
402125
402042
4027C8
40280C
402403
4BF2E5
----------------
object.Error: Access Violation
----------------
436098
435F0F
402042
4027C8
40280C
402403
4BF2E5
----------------
Bypasses std.file.FileException std\file.d(551)
object.Error: Access Violation

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 04 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7223


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com



PDT ---
Code example ? Link to discussion ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 19 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7223


Jesse Phillips <Jesse.K.Phillips+D gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Jesse.K.Phillips+D gmail.co
                   |                            |m



08:23:35 PDT ---

 Code example ? Link to discussion ?
A code example is tricky because the issue revolves around the environment and not the specific code. But here you go: import std.file; void main() { rmdirRecurse(r"C:\noper"); } Now create C:\noper as a different user from what you will be running it as, or find another way to remove your permissions. Probably throw in a file or two too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012