File tree 1 file changed +2
-23
lines changed
mythplugins/mytharchive/mytharchivehelper
1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change 30
30
#include < sys/wait.h> // for WIFEXITED and WEXITSTATUS
31
31
#include < unistd.h>
32
32
33
- #include < QtGlobal>
34
- #if defined(Q_OS_DARWIN) or defined(__FreeBSD__)
35
- #include < sys/param.h>
36
- #include < sys/mount.h>
37
- #elif defined(__linux__)
38
- #include < sys/vfs.h>
39
- #endif
40
-
41
33
// Qt headers
42
34
#include < QApplication>
43
35
#include < QFile>
49
41
#include < QTextStream>
50
42
51
43
// MythTV headers
44
+ #include < filesysteminfo.h>
52
45
#include < mythcommandlineparser.h>
53
46
#include < mythmiscutil.h>
54
- #include < mythcoreutil.h>
55
47
#include < mythcontext.h>
56
48
#include < mythversion.h>
57
49
#include < exitcodes.h>
@@ -2237,21 +2229,8 @@ static int isRemote(const QString& filename)
2237
2229
if (!QFile::exists (filename))
2238
2230
return 0 ;
2239
2231
2240
- // TODO replace with FileSystemInfo?
2241
- #ifdef Q_OS_DARWIN
2242
- struct statfs statbuf {};
2243
- if ((statfs (qPrintable (filename), &statbuf) == 0 ) &&
2244
- ((!strcmp (statbuf.f_fstypename , " nfs" )) || // NFS|FTP
2245
- (!strcmp (statbuf.f_fstypename , " afpfs" )) || // ApplShr
2246
- (!strcmp (statbuf.f_fstypename , " smbfs" )))) // SMB
2232
+ if (!FileSystemInfo (QString (), filename).isLocal ())
2247
2233
return 2 ;
2248
- #elif defined(__linux__)
2249
- struct statfs statbuf {};
2250
- if ((statfs (qPrintable (filename), &statbuf) == 0 ) &&
2251
- ((statbuf.f_type == 0x6969 ) || // NFS
2252
- (statbuf.f_type == 0x517B ))) // SMB
2253
- return 2 ;
2254
- #endif
2255
2234
2256
2235
return 1 ;
2257
2236
}
You can’t perform that action at this time.
0 commit comments