From f2a32aa76ab44dc989f38c25868075dc9827e9e8 Mon Sep 17 00:00:00 2001 From: "G. Gibson" Date: Sat, 23 Apr 2022 16:05:40 -0700 Subject: [PATCH] fixed destroy method on URA --- Services/core.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Services/core.rb b/Services/core.rb index 0afbffd..b87d754 100755 --- a/Services/core.rb +++ b/Services/core.rb @@ -928,8 +928,14 @@ module GxG result = {:result => false, :error => "Permission Error", :error_code => :permission} end end - unless result - result = {:result => ::GxG::VFS.destroy(the_path, credential)} + unless result + the_profile = self.profile(the_path, credential) + if [:virtual_directory, :directory, :persisted_array].include?(the_profile[:type]) + result = {:result => ::GxG::VFS.rmdir(the_path)} + else + result = {:result => ::GxG::VFS.rmfile(the_path)} + end + # xxx end result end