User forums > Help

don't edit source

(1/2) > >>

Ale_88:
Hi i'm a new italian developer with linux and codeblocks. I have install codeblocks and open a cpp file. But i can't  modify the source.. if I press any key on the keyboard in the source nothing is modify.,. why? Thanks

Jenna:
That happens, if you don't have write access to the file.

Ale_88:
Ok i have do that chmod 777 main.cpp or chmod 666 main.cpp.. and now i can edit but don't save... :( help me and sorry for my stupid question...

Jenna:
You also need write access to the directory your files are in, to be able to save them.

olipfei:
@Ale_88:


--- Quote ---if I press any key on the keyboard in the source nothing is modify.,. why?

--- End quote ---
Could you go a little bit more into detail here, please? You mean, the source is not modified in the CB editor, or, after trying to save, on the disk? When you try to save, is there any CB dialog shown? Do there remain files with ending .cbTemp alongside your original files? Finally, most interesting to me: do the files you are editing reside on a vfat (FAT, FAT32, ...) file system?

Sorry to have to interfere on this thread, but I also experience problems on LInux saving files from CB, when they are located on a vfat file system (not reiserfs, which is the only other 'real' Linux fs I have to test).

My symptom is that when I try to save a modified file, e.g. mainframe.cpp, then the 'Error saving file' dialog pops up twice (curiously enough!), and a file mainframe.cpp.cbTemp remains on the disk. However, I want to strongly emphasize that I AM able to save the same files from other familiar Linux editors (kate, gedit, vim) on the same file system with the same mount options.

Speaking of mount options, I've also experimented with my settings a little bit. Usually I mount my vfat partition (FAT32 formatted) with umask=0002, uid=root and gid=users, the group I am in as ordinary user, so saving from CB SHOULD work (as it does from other editors!). Nothing changes when using umask=0000, but, setting uid=oliver guess what, saving files from within CB works (nanonanet, as we say in some German slangs...).

@jens:


--- Quote ---That happens, if you don't have write access to the file.
...
You also need write access to the directory your files are in, to be able to save them.

--- End quote ---
As you can guess now, I believe this doesn't seem to be the only source of the problem, at least not in my case. You could argue that I have a workaround using the aforementioned mount options, but yet, there seems to persist some problem in CB with saving files in the described manner. What I can see from CB's sources I know there have been problems of similar kind which were presumed to be fixed (r5104, in particular filemanager.cpp, is this right?), I'm also aware of http://biplab.in/2008/06/file-permission-bug-of-cb/.

I must admit I don't understand enough of the background facts which can cause such weird situations, but I really would like to help tracking down this bug to finally get rid of it!-)

Regards,
Oliver

Navigation

[0] Message Index

[#] Next page

Go to full version