From a68d748c0a3345914e7a6bf9fdc1092b960106f2 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Tue, 18 Jun 2024 13:14:37 +0200 Subject: [PATCH] Ensure index repos can be deleted on Windows (#1696) * Ensure index repos can be deleted on Windows * Update alire-version.ads --- src/alire/alire-index_on_disk.adb | 8 ++++---- 1 file changed, 4 insertions(+), 4 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