Skip to content
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

Cannot create file '/my_project/.gitignore'. File already exists. #55

Closed
nikolaygit opened this issue Sep 30, 2014 · 0 comments
Closed
Labels

Comments

@nikolaygit
Copy link

the PyCharm message to create .gitignore was snown twice and when clicked the second time, it throws this error:

Cannot create file '/my_project/.gitignore'. File already exists.: Cannot create file '/my_project/.gitignore'. File already exists.
com.intellij.util.IncorrectOperationException: Cannot create file '/my_project/.gitignore'. File already exists.
    at com.intellij.psi.impl.file.PsiDirectoryImpl.checkAdd(PsiDirectoryImpl.java:518)
    at com.intellij.psi.impl.file.PsiDirectoryImpl.add(PsiDirectoryImpl.java:444)
    at mobi.hsz.idea.gitignore.file.GitignoreTemplatesFactory.createFromTemplate(GitignoreTemplatesFactory.java:30)
    at mobi.hsz.idea.gitignore.command.CreateFileCommandAction.run(CreateFileCommandAction.java:21)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
    at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:118)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
    at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:115)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
    at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:112)
    at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:33)
    at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:80)
    at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:85)
    at mobi.hsz.idea.gitignore.daemon.MissingGitignoreNotificationProvider$1.run(MissingGitignoreNotificationProvider.java:63)
    at com.intellij.ui.EditorNotificationPanel$2.hyperlinkActivated(EditorNotificationPanel.java:88)
    at com.intellij.ui.HyperlinkAdapter.hyperlinkUpdate(HyperlinkAdapter.java:28)
    at com.intellij.ui.HyperlinkLabel.fireHyperlinkEvent(HyperlinkLabel.java:172)
    at com.intellij.ui.HyperlinkLabel.processMouseEvent(HyperlinkLabel.java:105)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

@hsz hsz added the bug label Oct 22, 2014
@hsz hsz closed this as completed in 582167f Oct 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants