Fossil SCM

Tell file_issocket() to always return 0 on Windows builds, as reported in [forum:a41fe3d6d0c97b43|forum post a41fe3d6d0c97b43].

stephan 2024-08-09 12:13 trunk
Commit ba884453e5cf7a2c12ad74b03dd3b31b6d12d6ea7d761b6b1a33131021205a31
1 file changed +4
+4
--- src/file.c
+++ src/file.c
@@ -236,14 +236,18 @@
236236
237237
/*
238238
** Return TRUE if zFilename is a socket.
239239
*/
240240
int file_issocket(const char *zFilename){
241
+#ifdef _WIN32
242
+ return 0;
243
+#else
241244
if( getStat(zFilename, ExtFILE) ){
242245
return 0; /* stat() failed. Return false. */
243246
}
244247
return S_ISSOCK(fx.fileStat.st_mode);
248
+#endif
245249
}
246250
247251
/*
248252
** Create a symbolic link named zLinkFile that points to zTargetFile.
249253
**
250254
--- src/file.c
+++ src/file.c
@@ -236,14 +236,18 @@
236
237 /*
238 ** Return TRUE if zFilename is a socket.
239 */
240 int file_issocket(const char *zFilename){
 
 
 
241 if( getStat(zFilename, ExtFILE) ){
242 return 0; /* stat() failed. Return false. */
243 }
244 return S_ISSOCK(fx.fileStat.st_mode);
 
245 }
246
247 /*
248 ** Create a symbolic link named zLinkFile that points to zTargetFile.
249 **
250
--- src/file.c
+++ src/file.c
@@ -236,14 +236,18 @@
236
237 /*
238 ** Return TRUE if zFilename is a socket.
239 */
240 int file_issocket(const char *zFilename){
241 #ifdef _WIN32
242 return 0;
243 #else
244 if( getStat(zFilename, ExtFILE) ){
245 return 0; /* stat() failed. Return false. */
246 }
247 return S_ISSOCK(fx.fileStat.st_mode);
248 #endif
249 }
250
251 /*
252 ** Create a symbolic link named zLinkFile that points to zTargetFile.
253 **
254

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button