Philro;493786 Wrote:
> Hi
>
> i checkedout an older Rev(8175) cause its from the date you had written
> it worked. But same Problem with this Rev. So i tried the 8202 from
> today morning. Same Problem. Here is the Debug Log from Visual Studio
> until the Point where the issue appears. Allways i press the finish
> Button i've got the same Message
This was new code for 7.5 that I simply rewrote without testing (I
still
used my old config files from the last version, so I never went through
the
setup). You might try to step through the method below(this is from
squeezeplay/src/system.c), to see what is wrong. It could be, that just
the return code of rename is wrong.
Lyf
Code:
--------------------
/*
*
*/
static int system_atomic_write(lua_State *L)
{
const char *fname, *fdata;
char *tname;
size_t n, len;
FILE *fp;
#if HAVE_FSYNC && !defined(FSYNC_WORKAROUND_ENABLED)
DIR *dp;
#endif
fname = lua_tostring(L, 2);
fdata = lua_tolstring(L, 3, &len);
tname = alloca(strlen(fname) + 5);
strcpy(tname, fname);
strcat(tname, ".new");
if (!(fp = fopen(tname, "w"))) {
return luaL_error(L, "fopen: %s", strerror(errno));
}
n = 0;
while (n < len) {
n += fwrite(fdata + n, 1, len - n, fp);
if (ferror(fp)) {
fclose(fp);
return luaL_error(L, "fwrite: %s", strerror(errno));
}
}
if (fflush(fp) != 0) {
fclose(fp);
return luaL_error(L, "fflush: %s", strerror(errno));
}
#if HAVE_FSYNC && !defined(FSYNC_WORKAROUND_ENABLED)
if (fsync(fileno(fp)) != 0) {
fclose(fp);
return luaL_error(L, "fsync: %s", strerror(errno));
}
#endif
if (fclose(fp) != 0) {
return luaL_error(L, "fclose: %s", strerror(errno));
}
#if defined(WIN32)
/* windows systems must delete old file first */
#ifndef _WIN32_WCE
if (_access_s(fname, 0) == 0)
#else
if (wceex_access(fname, 0) == 0)
#endif
{
***************** HERE
if (remove(fname) != 0) {
return luaL_error(L, "remove old file: %s",
strerror(errno));
}
}
#endif
if (rename(tname, fname) != 0) {
return luaL_error(L, "rename: %s", strerror(errno));
}
#ifdef FSYNC_WORKAROUND_ENABLED
/* sync filesystem if fsync is broken */
sync();
#elif HAVE_FSYNC
if (!(dp = opendir(dirname(tname)))) {
return luaL_error(L, "opendir: %s", strerror(errno));
}
if (fsync(dirfd(dp)) != 0) {
closedir(dp);
return luaL_error(L, "fsync: %s", strerror(errno));
}
if (closedir(dp) != 0) {
return luaL_error(L, "closedir: %s", strerror(errno));
}
#endif
return 0;
}
--------------------
--
rudolf_j
------------------------------------------------------------------------
rudolf_j's Profile: http://forums.slimdevices.com/member.php?userid=29177
View this thread: http://forums.slimdevices.com/showthread.php?t=61925
_______________________________________________
jive mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive