Skip to content

Commit

Permalink
Merge pull request #738 from elanthia-online/update.rb-FileUtils.rm_r…
Browse files Browse the repository at this point in the history
…f-fix

[all][update.rb] bugfix: properly delete lib files on update
  • Loading branch information
mrhoribu authored Jan 25, 2025
2 parents 1fe9a8d + 47c21aa commit e05b2fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def self.download_update
FileUtils.mv(File.join(TEMP_DIR, new_target[0]), File.join(TEMP_DIR, filename))

# delete all existing lib files to not leave old ones behind
FileUtils.rm_f(Dir.glob(File.join(LIB_DIR, "*")))
FileUtils.rm_rf(Dir.glob(File.join(LIB_DIR, "*")))

_respond; _respond 'Copying updated lich files to their locations.'

Expand Down Expand Up @@ -248,7 +248,7 @@ def self.revert
_respond "No prior Lich5 version found. Seek assistance."
else
# delete all lib files
FileUtils.rm_f(Dir.glob(File.join(LIB_DIR, "*")))
FileUtils.rm_rf(Dir.glob(File.join(LIB_DIR, "*")))
# copy all backed up lib files
FileUtils.cp_r(File.join(restore_snapshot, "lib", "."), LIB_DIR)
# delete array of core scripts
Expand Down

0 comments on commit e05b2fc

Please sign in to comment.