1
0
Fork 0
mirror of synced 2024-12-25 08:13:20 -05:00

Revert previous commit

This commit is contained in:
Wu Tingfeng 2022-11-21 23:04:16 +08:00
parent 5049353fd4
commit cd5f421c04
No known key found for this signature in database
2 changed files with 7 additions and 11 deletions

View file

@ -9,12 +9,12 @@ except ImportError:
import re
import shutil
import tempfile
import urllib.request
import zipfile
from distutils.dir_util import copy_tree
from io import BytesIO
from os import path
import requests
# --- Globals ----------------------------------------------
PLUGINS = """
auto-pairs https://github.com/jiangmiao/auto-pairs
@ -73,16 +73,12 @@ SOURCE_DIR = path.join(path.dirname(__file__), "sources_non_forked_cache")
def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir):
temp_zip_path = path.join(temp_dir, plugin_name)
# Download and extract file in temp dir
req = requests.get(zip_path)
open(temp_zip_path, "wb").write(req.content)
with urllib.request.urlopen(zip_path) as req:
zip_f = zipfile.ZipFile(BytesIO(req.read()))
zip_f.extractall(temp_dir)
content_disp = req.headers.get("Content-Disposition")
zip_f = zipfile.ZipFile(temp_zip_path)
zip_f.extractall(temp_dir)
content_disp = req.headers.get("Content-Disposition")
filename = re.findall("filename=(.+).zip", content_disp)[0]
plugin_temp_path = path.join(temp_dir, path.join(temp_dir, filename))

View file

@ -10,7 +10,7 @@
""""""""""""""""""""""""""""""
let s:vim_runtime = expand('<sfile>:p:h')."/.."
call pathogen#infect(s:vim_runtime.'/sources_forked/{}')
call pathogen#infect(s:vim_runtime.'/sources_non_forked/{}')
call pathogen#infect(s:vim_runtime.'/sources_non_forked_cache/{}')
call pathogen#infect(s:vim_runtime.'/my_plugins/{}')
call pathogen#helptags()