Fixed by:

 

diff --git a/libsigrok/session_file.c b/libsigrok/session_file.c

index 880ef6d..1bf547a 100644

--- a/libsigrok/session_file.c

+++ b/libsigrok/session_file.c

@@ -94,7 +94,10 @@ SR_PRIV int sr_sessionfile_check(const char *filename)

                sr_dbg("Not a valid sigrok session file.");

                return SR_ERR;

        }

-

+       if ((ret = zip_close(archive)) == -1) {

+               sr_info("error saving zipfile: %s", zip_strerror(archive));

+               return SR_ERR;

+       }

        return SR_OK;

 }

 

How can linux version works fine…

发件人: jerryxjtu [mailto:[email protected]] 
发送时间: 2014年8月11日 0:28
收件人: '[email protected]'
主题: bug report: failed to save *.sr on windows platform

 

Hi All:

 

I’m using sigrok on WinXP, sigrok-cli.exe and pulseview.exe always failed
to saving session file.

eg: ./sigrok-cli.exe --driver xxx --samples 500 -o tmp2.sr -l 5

 

Function callback:

sr_session_append -> zip_close -> _zip_rename -> MoveFileExA

win32 API MoveFileExA return 0, which means file move failed.

 

MoveFileExA first called from sr_session_save_init

MoveFileExA(tmp2.sr.a00260, tmp2.sr,
MOVEFILE_COPY_ALLOWED|MOVEFILE_REPLACE_EXISTING);    successed

Then called from sr_session_append

MoveFileExA(tmp2.sr.a00260, tmp2.sr,
MOVEFILE_COPY_ALLOWED|MOVEFILE_REPLACE_EXISTING);    failed

 

I have no idea how it failed…

 

Best Regards

Jerry

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to