diff --git a/src/alire/alire-vfs.adb b/src/alire/alire-vfs.adb index 4dd2294a4..2fb2e3b6c 100644 --- a/src/alire/alire-vfs.adb +++ b/src/alire/alire-vfs.adb @@ -11,8 +11,8 @@ package body Alire.VFS is return String is Relative : constant Any_Path := - Directories.Find_Relative_Path (Parent => From, - Child => Path); + Directories.Find_Relative_Path (Parent => From, + Child => Path); begin if Check_Absolute_Path (Relative) then return Path; @@ -21,6 +21,21 @@ package body Alire.VFS is end if; end Attempt_Portable; + ----------------- + -- To_Portable -- + ----------------- + + function To_Portable (Path : Relative_Path) return Portable_Path + is + begin + case GNATCOLL.OS.Constants.OS is + when MacOS | Unix => + return Portable_Path (Path); + when Windows => + return Portable_Path (Replace (Path, "\", "/")); + end case; + end To_Portable; + -------------- -- Read_Dir -- -------------- diff --git a/src/alire/alire-vfs.ads b/src/alire/alire-vfs.ads index 2f406f9cf..743ddd224 100644 --- a/src/alire/alire-vfs.ads +++ b/src/alire/alire-vfs.ads @@ -96,15 +96,6 @@ private and then not Check_Absolute_Path (Path)); - ----------------- - -- To_Portable -- - ----------------- - - function To_Portable (Path : Relative_Path) return Portable_Path - is (case GNATCOLL.OS.Constants.OS is - when MacOS | Unix => Portable_Path (Path), - when Windows => Portable_Path (Replace (Path, "\", "/"))); - --------------- -- To_Native -- ---------------