Fix a broken test
This commit is contained in:
parent
601331b508
commit
b75aa4b8d6
2 changed files with 4 additions and 1 deletions
|
@ -41,7 +41,7 @@ class Wiki
|
|||
def move_files(old_path, new_path)
|
||||
return if new_path == old_path
|
||||
default_path = Rails.root.join("webs", "files")
|
||||
FileUtils.rmdir(new_path)
|
||||
FileUtils.rmdir(new_path) if File.exist?(new_path)
|
||||
if [old_path, new_path].include? default_path
|
||||
File.rename(old_path, new_path)
|
||||
FileUtils.rmdir(old_path.parent) unless old_path == default_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue