Skip to content

Commit e4d09dc

Browse files
committed
fixed rope new project path error
In windows, when vim without 'shellslash' options, the function getcwd() return path string use '\' as directory separator. This will cause python parse it error. To solve it, replace the '\' with '/'.
1 parent 7a449a5 commit e4d09dc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pymode/rope.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ def new():
235235
default = env.var('g:pymode_rope_project_root')
236236
if not default:
237237
default = env.var('getcwd()')
238+
if sys.platform.startswith('win32'):
239+
default = default.replace('\\', '/')
238240
root = env.var('input("Enter project root: ", "%s")' % default)
239241
ropefolder = env.var('g:pymode_rope_ropefolder')
240242
prj = project.Project(projectroot=root, ropefolder=ropefolder)

0 commit comments

Comments
 (0)