-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"java.io.FileNotFoundException" on synchronization #15
Comments
I think I've found the cause for this bug. I fixed it for SFTPFileSynchronizer.
in line 128 in SFTPFileSynchronizer.java (before the comment). Currently the error happens like this in pycharm: I've cloned it and imported it into intellij, and successfully build a modified version of the plugin. I fixed FTPFileSynchronizer.java, FTPSFileSynchronizer.java and SFTPFileSynchronizer.java. Should I collaborate on the project (for this small changes it isn't nessecary I guess). The modified plugin build: sourcesync.zip (You have to unzip it before using "Install plugin from disk" to the jar in pycharm). |
Hi @JackLeEmmerdeur, thx for the update. Would be fair to you if you would do a fork and push a merge request. But before doing that, this fix needs to discussed at length. Your fix might work but I don't think it's the proper place. Historically speaking - the first few versions of the plugin tried to upload the file to a remote path that would contain the project name. For example if you have a project called testproject and java file residing in: C:\MyProjects\testproject\src\java\com\example\ToSyncFile.java. Then the first versions of sourcesync tried to import the ToSyncFile in root + \testproject + \src\java\com\example\ToSyncFile.java In the meantime \testproject was removed from the logic and you will have to add it manually to root if you want. But I think that change was unfinished, in the sense that the local path is still computed to the path of the project, which is kind of stupid (in my defense at the time I wrote the code I did not knew that Intellij/PyCharm supports project configuration in a different place than the source of files) In another words - unfinished fix + projects configurations in different location than the src directory can get you in this sort of situations. So in my opinion the fix should be done in the |
Hi @fioan89.
Both problems are fixed within action/ActionSelectedFilesToRemote.java as you suggested. (*1) File at project rootProject dir: F:\Documents\dev\python\script (*2) External content-root-dir
I can do a push from my fork if you like. ATM I just cloned your repo locally. I haven't pushed code to an original repo on github in the past and never did a pull request either, but I speak a little bit of GIT, as using it on work. Maybe you could explain your usual way of importing/reviewing code from contributors? |
PyCharm 4.0.4 on Windows:
I have one Project called default. The project's location is
F:\Program Files\PyCharm\.PyCharm\PycharmProjects\default
. This project has multiple content roots. Trying to syncF:\Documents\dev\python\script\script.py
results inObviously Source Synchronizer "thinks" the location of the file to be synchronized is relative to the project root.
The text was updated successfully, but these errors were encountered: