python-rope / ropevim

vim mode that uses rope library to provide features like python refactorings and code-assists
GNU General Public License v2.0
247 stars 34 forks source link

Fix issue where _samefile fails due to os.stat #94

Closed eivindjahren closed 2 years ago

eivindjahren commented 2 years ago

os.path.samefile will call os.stat in order to determine if the files are the same. This fails on non-existent files. Closes #88 and Closes #77. The fix changes how #80 fails, but I am unsure whether there is more to that issue since the filename seems to be empty as well as non-existent.

lieryan commented 2 years ago

So, IIUC, if the file doesn't exist, then it compares the path, it looks fairly reasonable.

lieryan commented 2 years ago

Thanks for fixing this issue @eivindjahren