From 5c392781ee9d0e7c94693e75ea1b78ae924b0bf3 Mon Sep 17 00:00:00 2001 From: wzdf1982 Date: Sun, 22 Apr 2012 12:37:34 +0800 Subject: [PATCH] update for suit for window --- is_rails_file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/is_rails_file.py b/is_rails_file.py index 495d915..bf7211d 100644 --- a/is_rails_file.py +++ b/is_rails_file.py @@ -21,12 +21,12 @@ def is_rails_file(file_name): # the existence of config/routes.rb. If it's found, the assumption is made that it's # a Rails app. while path != '': - if os.path.exists(path + '/config/routes.rb'): + if os.path.exists(path + '\\config\\routes.rb'): result = True break else: - dirs = path.split('/') + dirs = path.split('\\') dirs.pop() - path = '/'.join(dirs) + path = '\\'.join(dirs) return extension in ['.rb', '.rake'] and result