summaryrefslogtreecommitdiff
path: root/gcc/ada/g-dirope.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-16 12:24:19 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-16 12:24:19 +0000
commit437991c26e282a913f80ad42b75b7256fabaa985 (patch)
tree77bfbb53beec393fc559fe7c0deb44d5bedc9509 /gcc/ada/g-dirope.adb
parent105907b4e65497fd891ac529c8fc880610f71a40 (diff)
downloadgcc-437991c26e282a913f80ad42b75b7256fabaa985.tar.gz
2009-04-16 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_rmdir): New routine. Simple wrapper routines used to convert to proper encoding on Windows. * s-crtl.ads: Use __gnat_rmdir instead of direct call to the C library. * g-dirope.adb (Remove_Dir): Fix a bug, the root directory was removed twice. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-dirope.adb')
-rw-r--r--gcc/ada/g-dirope.adb5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/ada/g-dirope.adb b/gcc/ada/g-dirope.adb
index 33086ed1766..c7670ef558b 100644
--- a/gcc/ada/g-dirope.adb
+++ b/gcc/ada/g-dirope.adb
@@ -739,9 +739,7 @@ package body GNAT.Directory_Operations is
-- Remove the directory only if it is empty
if not Recursive then
- rmdir (C_Dir_Name);
-
- if GNAT.OS_Lib.Is_Directory (Dir_Name) then
+ if rmdir (C_Dir_Name) /= 0 then
raise Directory_Error;
end if;
@@ -764,7 +762,6 @@ package body GNAT.Directory_Operations is
Str (1 .. Last) /= ".."
then
Remove_Dir (Str (1 .. Last), True);
- Remove_Dir (Str (1 .. Last));
end if;
else