Skip to content

Commit 2cba278

Browse files
committed
Also clear site-packages when updating
1 parent 720c2df commit 2cba278

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

addons/source-python/docs/source-python/source/general/updating.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ Manually
77
1. Delete the entire ``../addons/source-python/data/source-python/`` directory.
88
2. Delete the ``../addons/source-python/data/source-python-data.zip`` file if present.
99
3. Delete the entire ``../addons/source-python/packages/source-python/`` directory.
10-
4. Delete the entire ``../addons/source-python/docs/source-python/`` directory.
11-
5. Delete the entire ``../addons/source-python/Python3/`` directory.
12-
6. Continue with the :doc:`installation tutorial <installation>`.
10+
4. Delete the entire ``../addons/source-python/packages/site-packages/`` directory.
11+
5. Delete the entire ``../addons/source-python/docs/source-python/`` directory.
12+
6. Delete the entire ``../addons/source-python/Python3/`` directory.
13+
7. Continue with the :doc:`installation tutorial <installation>`.
1314

1415

1516
Automatically

src/loader/updater.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ void ApplyUpdateStage2()
9999

100100
// Delete old directories
101101
DeleteDir(bfs::path(szGameDir) / SP_PACKAGE_PATH);
102+
DeleteDir(bfs::path(szGameDir) / SITE_PACKAGE_PATH);
102103
DeleteDir(bfs::path(szGameDir) / SP_DATA_PATH);
103104
DeleteDir(bfs::path(szGameDir) / SP_DOCS_PATH);
104105
DeleteDir(bfs::path(szGameDir) / PYTHON3_PATH);

src/loader/updater.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
//---------------------------------------------------------------------------------
3333
#define SP_UPDATE_PATH "addons/source-python/update"
3434
#define SP_PACKAGE_PATH "addons/source-python/packages/source-python"
35+
#define SITE_PACKAGE_PATH "addons/source-python/packages/site-packages"
3536
#define SP_DATA_PATH "addons/source-python/data/source-python"
3637
#define SP_DOCS_PATH "addons/source-python/docs/source-python"
3738
#define PYTHON3_PATH "addons/source-python/Python3"

0 commit comments

Comments
 (0)