Skip to content

Commit

Permalink
Ensure index repos can be deleted on Windows (#1696)
Browse files Browse the repository at this point in the history
* Ensure index repos can be deleted on Windows

* Update alire-version.ads
  • Loading branch information
mosteo authored Jun 18, 2024
1 parent dc1bb93 commit a68d748
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/alire/alire-index_on_disk.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a68d748

Please # to comment.