From 386da16a8de29a5d5f45de385eb488cdc6cca1f7 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Fri, 14 Jun 2024 12:18:28 +0200 Subject: [PATCH] Ensure index repos can be deleted on Windows --- src/alire/alire-index_on_disk.adb | 8 ++++---- src/alire/alire-version.ads | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/alire/alire-index_on_disk.adb b/src/alire/alire-index_on_disk.adb index 4d6258d38..2f9901d4e 100644 --- a/src/alire/alire-index_on_disk.adb +++ b/src/alire/alire-index_on_disk.adb @@ -77,11 +77,11 @@ package body Alire.Index_On_Disk is ------------ function Delete (This : Index'Class) return Outcome is - use Ada.Directories; + package Adirs renames Ada.Directories; begin - if Exists (This.Metadata_Directory) then - if Kind (This.Metadata_Directory) = Ada.Directories.Directory then - Delete_Tree (This.Metadata_Directory); + if Adirs.Exists (This.Metadata_Directory) then + if Adirs.Kind (This.Metadata_Directory) in Adirs.Directory then + Directories.Delete_Tree (This.Metadata_Directory); Trace.Debug ("Metadata dir deleted: " & This.Metadata_Directory); else return Outcome_Failure diff --git a/src/alire/alire-version.ads b/src/alire/alire-version.ads index 441a826dc..a9112dc84 100644 --- a/src/alire/alire-version.ads +++ b/src/alire/alire-version.ads @@ -16,7 +16,7 @@ private -- be replaced by `alr build` with the current commit, and appended with -- "_or_later" after build. - Current_Str : constant String := "2.1-dev"; + Current_Str : constant String := "2.1-dev+bd25511f_or_later"; -- 2.0.0: alr settings refactor and minor fixes -- 2.0.0-rc1: release candidate for 2.0 -- 2.0.0-b1: first public release on the 2.0 branch