Skip to content
This repository has been archived by the owner on Nov 14, 2017. It is now read-only.

Error while trying to invoke refresh module on an unsaved file #25

Closed
Mashashi opened this issue Dec 7, 2014 · 1 comment
Closed

Error while trying to invoke refresh module on an unsaved file #25

Mashashi opened this issue Dec 7, 2014 · 1 comment
Assignees
Labels

Comments

@Mashashi
Copy link

Mashashi commented Dec 7, 2014

Change

def _validate_folder(view, folder_name):
path = os.path.join(view.file_name().split(folder_name)[0],folder_name)
if os.path.exists(path):
return path
else:
sublime.error_message('Could not find: {}!'.format(path))
return None

to

def _validate_folder(view, folder_name):
if(view.file_name() is None):
sublime.error_message('Cannot validate "'+folder_name+'". File is not saved!')
return None

path = os.path.join(view.file_name().split(folder_name)[0],folder_name)
if os.path.exists(path):
    return path
else:
    sublime.error_message('Could not find: {}!'.format(path))
    return None

UPDATE:

See issue #26

@steveoh
Copy link
Member

steveoh commented Dec 7, 2014

Pull request?

@stdavis stdavis added the bug label Dec 11, 2014
@stdavis stdavis self-assigned this Dec 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants