>
>> Agreed Andrey. But I couldn't find any API(s) which can serve my
>> requirements. And we can't afford to execute (fork+exec) tools like
>> cygpath for each getcwd call.
>> Any suggestions on improving this approach or any alternative approach
>> are always welcome.
>
> https://cygwin.com/cygwi
On Fri, Dec 9, 2016 at 8:24 AM, Dipak Gaigole wrote:
> Agreed Andrey. But I couldn't find any API(s) which can serve my
> requirements. And we can't afford to execute (fork+exec) tools like
> cygpath for each getcwd call.
> Any suggestions on improving this approach or any alternative approach
>
>
> So in this situation, is it possible to get the cwd value as
> "/cygdrive/c/temp/appdir/bin" using some cygwin API?
> >>>
> >>> No, it is generally not possible to get the POSIX path to anything in
> >>> the cygwin root (/) tree to be prefixed by the /cygdrive prefix. The
> >>> /
Greetings, Dipak Gaigole!
So in this situation, is it possible to get the cwd value as
"/cygdrive/c/temp/appdir/bin" using some cygwin API?
>>>
>>> No, it is generally not possible to get the POSIX path to anything in
>>> the cygwin root (/) tree to be prefixed by the /cygdrive pref
>>>
>>> So in this situation, is it possible to get the cwd value as
>>> "/cygdrive/c/temp/appdir/bin" using some cygwin API?
>>
>> No, it is generally not possible to get the POSIX path to anything in
>> the cygwin root (/) tree to be prefixed by the /cygdrive prefix. The
>> /cygdrive prefix exist
>>
>> So in this situation, is it possible to get the cwd value as
>> "/cygdrive/c/temp/appdir/bin" using some cygwin API?
>
> No, it is generally not possible to get the POSIX path to anything in
> the cygwin root (/) tree to be prefixed by the /cygdrive prefix. The
> /cygdrive prefix exists solel
On 12/07/2016 04:22 PM, Dipak Gaigole wrote:
> C:\Temp\appdir>.\test_cwd.exe "bin"
> chdir (bin) reuturned <0>
> GetCurrentDirectory returned , ret = <18>
> getcwd returned , ret =
>
> C:\Temp\appdir>
> ##
> Please note that I have the cygwin1.dll in t
>> I am facing a very strange problem with chdir and GetCurrentDirectory.
>
> Not strange at all. The two are incompatible. When writing Cygwin
> programs, stick to the POSIX-y interface, NOT the windows interface.
>
>> After calling chdir (), the call to GetCurrentDirectory () returns
>
> chdir(
On 12/07/2016 02:23 PM, Dipak Gaigole wrote:
> Hello,
>
> I am facing a very strange problem with chdir and GetCurrentDirectory.
Not strange at all. The two are incompatible. When writing Cygwin
programs, stick to the POSIX-y interface, NOT the windows interface.
> After calling chdir (), the
> GetCurrentDirectory failed with ERROR_INVALID_HANDLE. As a result the
> buffer was not populated. What is in dirname[] is stack garbage.
As per the documentation of GetCurrentDirectory(), "If the function
succeeds, the return value specifies the number of characters that are
written to the buf
On 12/7/2016 3:23 PM, Dipak Gaigole wrote:
> GetCurrentDirectory returned , ret = <6>
GetCurrentDirectory failed with ERROR_INVALID_HANDLE. As a result the
buffer was not populated. What is in dirname[] is stack garbage.
My guess is that /cygdrive/c/Program Files is not associated with a
device
Hello,
I am facing a very strange problem with chdir and GetCurrentDirectory.
After calling chdir (), the call to GetCurrentDirectory () returns
wrong value. I tested this on Windows 7 and Windows 2016. It is
working fine on Windows 7 whereas wrong values are returned on Windows
2016. I guess we s
12 matches
Mail list logo