Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

[Bug] File system view without content #237

Closed
GitMensch opened this issue Oct 26, 2015 · 10 comments
Closed

[Bug] File system view without content #237

GitMensch opened this issue Oct 26, 2015 · 10 comments
Labels
Milestone

Comments

@GitMensch
Copy link

There's no content with current 4.7 preview 2 with some files.

System information

  • OpenCobolIDE: 4.7.dev37
  • GnuCOBOL: GNU Cobol 1.1.0
  • Python: 3.4.3 (32bits)
  • Qt: 5.5.0
  • PyQt: 5.5
  • pyqode.core: 2.7.0.dev33
  • pyqode.cobol: 2.7.dev0
  • pyqode.qt: 2.7.dev0
  • pygments: 2.0.2
  • QDarkStyle: 2.1

Log:

DEBUG::pyqode.core.managers.file::file open: c:\test.cob
DEBUG::pyqode.core.widgets.splittable_tab_widget::current tab changed (old=CobolCodeEdit(path='\\\\SERVER\\share\\com.cob'), new=CobolCodeEdit(path='C:\\TEST.COB'))
DEBUG::open_cobol_ide.compilers::detecting file type: C:\TEST.COB - cp1252
DEBUG::open_cobol_ide.compilers::file type: <FileType.MODULE: 1>
DEBUG::open_cobol_ide.compilers::detecting file type: C:\TEST.COB - cp1252
DEBUG::open_cobol_ide.compilers::file type: <FileType.MODULE: 1>
INFO::open_cobol_ide.controllers.edit::current editor changed: C:\TEST.COB
DEBUG::pyqode.core.api.folding::(l96) inconsistent fold level, difference between consecutive blocks cannot be greater than 1 (2).
DEBUG::pyqode.core.api.folding::(l111) inconsistent fold level, difference between consecutive blocks cannot be greater than 1 (2).
DEBUG::pyqode.core.api.syntax_highlighter::rehighlight duration: 0.148000s
DEBUG::open_cobol_ide.view.editors.cobol::linter enabled: True
DEBUG::open_cobol_ide.compilers::detecting file type: C:\TEST.COB - cp1252
DEBUG::open_cobol_ide.compilers::file type: <FileType.MODULE: 1>
DEBUG::open_cobol_ide.controllers.view::showing page <Page.EDIT: 1>
@GitMensch
Copy link
Author

Just to add this bit of information: for some files the file system pane has content, I'm not sure what the reason for this is.

@ColinDuquesnoy
Copy link
Contributor

It happens only with UNC paths isn't it?

QFileSystemModel does not support unc paths. Fixing this is a huge task as it requires to rewrite the entire file system model. I never work with UNC path and I won't fix this.

@GitMensch
Copy link
Author

Therefore the "fix" is to add the following:

  • a warning message when opening from UNC path and
  • if possible output of "UNC-Paths not supported" in file system view

Please reopen the issue for this.

And... No, happens with C:\TEST.COB, too.

@ColinDuquesnoy
Copy link
Contributor

No, happens with C:\TEST.COB, too.

Very strange...never occured for me but I'll rechek.

@ColinDuquesnoy ColinDuquesnoy added this to the 4.7 milestone Oct 26, 2015
@ColinDuquesnoy
Copy link
Contributor

No, happens with C:\TEST.COB, too.

This happen because the file you open is at the root of your drive.

The treeview has been designed to show the parent directory as the root node. To accomplish that we actually set the parent directory of the directory that contains the file you opened and ignore all directories except the directory that contains the file.

Solved by showing all files/directories as top level items if the root path is a mount point.

@ColinDuquesnoy
Copy link
Contributor

I still have to handle the case of UNC paths.

@ColinDuquesnoy
Copy link
Contributor

I added both a warning message box (shown only once per session) and a warning item in the treeview.
Here is how it looks:

warningbox

treeview

@GitMensch
Copy link
Author

How to say someone "it's not good what you want to do...": do it the Colin way 👍

@GitMensch
Copy link
Author

Just a question after seeing the message the first time on this machine.
Shouldn't it be "You are about to open a file using an UNC pathname." (the "n" is missing in the text but I may be wrong about this typo as a non-native speaker).

@ColinDuquesnoy
Copy link
Contributor

I am not a native speaker but I think the "n" is not missing because "U" sounds like a "Y" which is a consonant sound.

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

2 participants