More reverts from the windows issue.

This commit is contained in:
Andrew 2021-11-19 22:02:59 -05:00
parent 79190e15f5
commit 67444a2d4f
2 changed files with 2 additions and 1 deletions

View File

@ -214,7 +214,7 @@ class AjaxHandler(BaseHandler):
file_path = self.get_body_argument('file_path', default=None, strip=True)
server_id = self.get_argument('id', None)
if file_path.contains('/') or file_path('\\'):
if os.name == "nt":
file_path = file_path.replace('/', "\\")
console.warning("delete {} for server {}".format(file_path, server_id))

View File

@ -205,6 +205,7 @@
console.log(result);
if (result == true) {
var full_path = '{{ data['server_stats']['server_id']['backup_path'] }}' + '/' + file_to_del;
console.log(full_path);
del_backup(full_path, {{ data['server_stats']['server_id']['server_id'] }} );
}
}