Page 1 of 1

about *.cuda-proj file

Posted: 30.08.2024 09:05
by SamC
Hello,
Sometimes,I create a project with folder in portable device. After I remove the portable device and restart cuda,that node will be deleted automaticly. Is it possible to always keep that node but with "x" mark when that node path is unmounted untill be deleted manually?
Thanks!
Snipaste_2024-08-30_16-40-04.png
Snipaste_2024-08-30_16-40-04.png (4.79 KiB) Viewed 5216 times

Re: about *.cuda-proj file

Posted: 30.08.2024 09:27
by main Alexey
OK, will be changed like this.
do it on your copy of py/cuda_project_man/__init__.py,
remove this:

Code: Select all

                        for fn in bads:
                            self.project["nodes"].remove(fn)

Re: about *.cuda-proj file

Posted: 30.08.2024 09:41
by SamC
main Alexey wrote: 30.08.2024 09:27 OK, will be changed like this.
do it on your copy of py/cuda_project_man/__init__.py,
remove this:

Code: Select all

                        for fn in bads:
                            self.project["nodes"].remove(fn)
It seems some more modification for on_start should be done. Thanks!

Traceback (most recent call last):
File "C:\cudatext\py\cuda_project_man\__init__.py", line 1431, in on_start
self.action_open_project(items[0])
File "C:\cudatext\py\cuda_project_man\__init__.py", line 1080, in action_open_project
self.action_refresh()
File "C:\cudatext\py\cuda_project_man\__init__.py", line 928, in action_refresh
self.action_refresh_int(parent)
File "C:\cudatext\py\cuda_project_man\__init__.py", line 971, in action_refresh_int
nodes = sorted(nodes, key=Command.node_ordering_direntry)
File "C:\cudatext\py\cuda_project_man\__init__.py", line 497, in node_ordering_direntry
key = -path.stat().st_mtime
File "pathlib.py", line 1198, in stat
FileNotFoundError: [WinError 3] System can't find the path

Re: about *.cuda-proj file

Posted: 30.08.2024 10:32
by main Alexey
fixed it now.
get updated file from https://github.com/Alexey-T/CudaText/tree/master/app/py
(check that you got NOT HTML content).

Re: about *.cuda-proj file

Posted: 31.08.2024 02:14
by SamC
main Alexey wrote: 30.08.2024 10:32 fixed it now.
get updated file from https://github.com/Alexey-T/CudaText/tree/master/app/py
(check that you got NOT HTML content).
Works well now,Thanks!