summaryrefslogtreecommitdiff
path: root/gcc/ada/s-os_lib.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 08:35:21 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 08:35:21 +0000
commit2ae4909a20c4a171978a397b305048ba96a3f142 (patch)
tree0a3b9b75c9d075679160076e009c1c0858b535a0 /gcc/ada/s-os_lib.adb
parente889b814bcb76803e93165a8d964f4ee07207048 (diff)
downloadgcc-2ae4909a20c4a171978a397b305048ba96a3f142.tar.gz
2008-08-01 Jerome Lambourg <lambourg@adacore.com>
* s-os_lib.adb (Normalize_Pathname): Take care of double-quotes in paths, which are authorized by Windows but can lead to errors when used elsewhere. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-os_lib.adb')
-rwxr-xr-xgcc/ada/s-os_lib.adb18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/s-os_lib.adb b/gcc/ada/s-os_lib.adb
index 6df7fa4a7c8..532fca41d0f 100755
--- a/gcc/ada/s-os_lib.adb
+++ b/gcc/ada/s-os_lib.adb
@@ -1921,6 +1921,24 @@ package body System.OS_Lib is
end;
end if;
+ -- On Windows, remove all double-quotes that are possibly part of the
+ -- path but can cause problems with other methods.
+
+ if On_Windows then
+ declare
+ Index : Natural := Path_Buffer'First;
+ begin
+ for Current in Path_Buffer'First .. End_Path loop
+ if Path_Buffer (Current) /= '"' then
+ Path_Buffer (Index) := Path_Buffer (Current);
+ Index := Index + 1;
+ end if;
+ end loop;
+
+ End_Path := Index - 1;
+ end;
+ end if;
+
-- Start the conversions
-- If this is not finished after Max_Iterations, give up and return an