|
@@ -128,7 +128,7 @@ def open_file_by_wps(file_path):
|
|
if not os.path.exists(file_path):
|
|
if not os.path.exists(file_path):
|
|
return jsonify({'code': 3006, 'msg': '文件不存在'})
|
|
return jsonify({'code': 3006, 'msg': '文件不存在'})
|
|
|
|
|
|
- subprocess.run([file_type_map[ext], file_path])
|
|
|
|
|
|
+ subprocess.run(['sudo', file_type_map[ext], file_path])
|
|
|
|
|
|
return jsonify({'code': 1000, 'msg': '操作完成'})
|
|
return jsonify({'code': 1000, 'msg': '操作完成'})
|
|
|
|
|
|
@@ -358,9 +358,9 @@ def refresh_token():
|
|
|
|
|
|
|
|
|
|
@logger.catch()
|
|
@logger.catch()
|
|
-@app.route('/get_yozo_path', methods=['POST'])
|
|
|
|
|
|
+@app.route('/get_yozo_path', methods=['GET'])
|
|
def get_yozo_path():
|
|
def get_yozo_path():
|
|
- yozo_path = os.path.basename(os.path.basename(config.yozoc))
|
|
|
|
|
|
+ yozo_path = os.path.dirname(os.path.dirname(config.yozoc))
|
|
return jsonify({'code': 1000, 'msg': '操作成功', 'data': yozo_path})
|
|
return jsonify({'code': 1000, 'msg': '操作成功', 'data': yozo_path})
|
|
|
|
|
|
|
|
|