diff --git kiofusevfs.cpp kiofusevfs.cpp index 875da6f..b9c449f 100644 --- kiofusevfs.cpp +++ kiofusevfs.cpp @@ -2401,7 +2401,19 @@ int KIOFuseVFS::kioErrorToFuseError(const int kioError) { case KIO::ERR_CANNOT_RENAME_PARTIAL : return EIO; case KIO::ERR_NEED_PASSWD : return EACCES; case KIO::ERR_CANNOT_SYMLINK : return EIO; - case KIO::ERR_NO_CONTENT : return ENODATA; + case KIO::ERR_NO_CONTENT : +#ifdef ENODATA + /* ENODATA is defined by GNU libc, and C++ tr1 seems to have + * it as well, as does Boost: these consistently define it + * to the value 9919. There is no guarantee the underlying + * FUSE implementation understands that if ENODATA doesn't + * exist in libc, though -- in that case, fall back to + * the more generic EIO. + */ + return ENODATA; +#else + return EIO; +#endif case KIO::ERR_DISK_FULL : return ENOSPC; case KIO::ERR_IDENTICAL_FILES : return EEXIST; case KIO::ERR_SLAVE_DEFINED : return EIO;