Skip to content

Commit c4f6c31

Browse files
committed
move old config folder if it exists
1 parent 9b29631 commit c4f6c31

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

devdocs_desktop.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import gi
5+
import shutil
56
import signal
67
import argparse
78
import webbrowser
@@ -105,7 +106,13 @@ def search_webview(self):
105106
self.finder.search(text, opts, 100)
106107

107108
def create_settings_path(self):
108-
if not os.path.exists(self.settings_path()):
109+
new_path = self.settings_path()
110+
old_path = os.path.expanduser('~/.devdocs-desktop')
111+
112+
if os.path.exists(old_path):
113+
shutil.move(old_path, new_path)
114+
115+
if not os.path.exists(new_path):
109116
os.makedirs(self.settings_path())
110117

111118
def inject_custom_styles(self):

0 commit comments

Comments
 (0)