34c00c0b1d6d

Fix the tilde expansion problem.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 26 Aug 2009 17:43:13 -0400
parents 712ea48e6ee3
children 61803d906c96
branches/tags (none)
files t.py

Changes

--- a/t.py	Wed Aug 26 17:35:31 2009 -0400
+++ b/t.py	Wed Aug 26 17:43:13 2009 -0400
@@ -60,7 +60,7 @@
         self.taskdir = taskdir
         filemap = (('tasks', self.name), ('done', '.%s.done' % self.name))
         for kind, filename in filemap:
-            path = os.path.join(os.path.realpath(self.taskdir), filename)
+            path = os.path.join(os.path.expanduser(self.taskdir), filename)
             if os.path.isdir(path):
                 raise InvalidTaskfile
             if os.path.exists(path):
@@ -77,7 +77,7 @@
     def write(self):
         filemap = (('tasks', self.name), ('done', '.%s.done' % self.name))
         for kind, filename in filemap:
-            path = os.path.join(os.path.realpath(self.taskdir), filename)
+            path = os.path.join(os.path.expanduser(self.taskdir), filename)
             if os.path.isdir(path):
                 raise InvalidTaskfile
             with open(path, 'w') as tfile: