|
From: | Rishabh Dave |
Subject: | Re: [Nano-devel] Patch for bug #44950 |
Date: | Sat, 23 Jan 2016 20:36:06 +0530 |
Hello,On Thu, Jan 21, 2016 at 3:07 PM, Benno Schulenberg <address@hidden> wrote:
No, not yet. But see attached patch.
Ehmm... I am confused about the 'not-accessible.patch'. Code in repository is different. Was I supposed to work with it patched to source from repo? Patch I have attached is with regard to checking permissions and it is with respect to code in repository without considering 'not-accessible.patch'.
When working on on a project, it's better to follow the repo.
First install subversion, then run:
svn co http://svn.savannah.gnu.org/svn/nano/trunk/nano
There you can see the current state of affairs.
Every day do an 'svn up' to sync with the latest changes.
Yeah, I do not want to lag, so I am using SVN now.> } else if ((strcmp(filename, "") != 0) && (writable =
> is_file_writable(filename) == FALSE))
No, I don't want to use is_file_writable() -- it actually tries
to write to the directory, which causes:
https://savannah.gnu.org/bugs/?29312
and is probably the cause of this one too:
https://savannah.gnu.org/bugs/?36864
I have created a new function for isolating code and faults in it (all of this under 'check-permissions.patch'). Should we keep it that way if it works? We could merge it with 'has_valid_path()' as it is pretty similar and task performed is also much coherent. I have doubt for following pair of line under my own patch -
+ if (strcmp(parentdir, ".") == 0)
+ parentdir = mallocstrcpy(NULL, filename);
+ free(parentdir);
+ return validity;
+}
+'if-statement' is used to avoid 'free(): invalid pointer' error. It is not exactly good programming practice, is it?
Besides, source file 'proto.h' has return type of 'has_valid_path()' as void. I changed it to bool as it is bool under file 'files.c'. That is part of file 'bool-for-has_valid_path.patch' , if we need it.
And I did 'svn diff > *.patch', as you said, to create patches.
[Prev in Thread] | Current Thread | [Next in Thread] |