Home Download Buy Blog Forum Support

Accessing a file in a .sublime-package file

Accessing a file in a .sublime-package file

Postby gsingh93 on Wed Sep 11, 2013 2:36 am

I created plugin that required another text file in the plugin folder. My plugin worked fine in testing, but when I put it on Package Control and installed it, it didn't work because my code couldn't access the file in the .sublime-package file. Has anyone found a solution to this?
gsingh93
 
Posts: 5
Joined: Sun Sep 01, 2013 3:54 am

Re: Accessing a file in a .sublime-package file

Postby skuroda on Wed Sep 11, 2013 2:49 am

You can use "sublime#load_resource" to access the file. You can also add ".no-sublime-package" to the root of your plugin. This tells package control to always extract it.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: Accessing a file in a .sublime-package file

Postby gsingh93 on Wed Sep 11, 2013 4:09 am

Thanks! The ".no-sublime-package" worked for me.
gsingh93
 
Posts: 5
Joined: Sun Sep 01, 2013 3:54 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests