Re: trouble with g_stat
- From: Hrvoje Niksic <hrvoje niksic avl com>
- To: <gtk-list gnome org>
- Subject: Re: trouble with g_stat
- Date: Mon, 4 Jun 2018 11:10:04 +0200
On 06/04/2018 04:27 AM, GaryW wrote:
Both of the following examples compile ok, but while this works:
//------------------
GString *fspec;
struct stat sB;
//fspec->str tested to hold the correct file spec…
if(stat(fspec->str,&sB)>0){… [as expected]
this doesn’t:
//------------------
GString *fspec;
GStatBuf *stBuf;
//fspec->str tested to hold the correct file spec…
if(g_stat(fspec->str,stBuf)<0){… [9476 Segmentation fault]
I’ve tried tinkering with various permutations, but nothing else compiles.
Have you tried:
GString *fspec;
GStatBuf stBuf;
if (g_stat(fspec->str, &stBuf) < 0) ...
That's how you use regular stat, after all.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]