Chromium Code Reviews| Index: devserver.py |
| diff --git a/devserver.py b/devserver.py |
| index bf5e6d974abb2d432f745a36eea6559e9ab58cb9..208b3a626a8079eadf70f70d6c892763a8c6f7d7 100755 |
| --- a/devserver.py |
| +++ b/devserver.py |
| @@ -166,8 +166,8 @@ if __name__ == '__main__': |
| cherrypy.log('Using cache directory %s' % cache_dir, 'DEVSERVER') |
| if options.clear_cache: |
| - # Clear the cache and exit on error |
| - if os.system('sudo rm -rf %s' % cache_dir) != 0: |
| + # Clear the cache and exit on error. |
| + if os.system('rm -rf %s/*' % cache_dir) != 0: |
|
dgarrett
2011/01/27 22:43:38
I think this will give an error if the cache direc
|
| cherrypy.log('Failed to clear the cache with %s' % cmd, |
| 'DEVSERVER') |
| sys.exit(1) |
| @@ -180,6 +180,8 @@ if __name__ == '__main__': |
| cherrypy.log('Failed to clean up old delta cache files with %s' % cmd, |
| 'DEVSERVER') |
| sys.exit(1) |
| + else: |
| + os.makedirs(cache_dir) |
| cherrypy.log('Source root is %s' % root_dir, 'DEVSERVER') |
| cherrypy.log('Serving from %s' % static_dir, 'DEVSERVER') |