Fix copy phrases.txt error
authorPeng Huang <shawn.p.huang@gmail.com>
Thu, 15 Apr 2010 07:34:28 +0000 (15:34 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Thu, 15 Apr 2010 07:34:28 +0000 (15:34 +0800)
setup/main.py

index 29769d4..7c8eb12 100644 (file)
@@ -239,8 +239,8 @@ class PreferencesDialog:
             os.path.exists(path) or os.makedirs(path)
             path = os.path.join(path, "phrases.txt")
             if not os.path.exists(path):
-                datadir = os.getenv("IBUS_DATAROOTDIR") or "/usr/share/ibus-pinyin"
-                src = os.path.join(datadir, "phrases.txt")
+                datadir = os.getenv("IBUS_DATAROOTDIR") or "/usr/share"
+                src = os.path.join(datadir, "ibus-pinyin", "phrases.txt")
                 shutil.copyfile(src, path)
             os.system("xdg-open %s" % path)