Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
matteoserva committed May 10, 2014
1 parent 01f886b commit 03cc6f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MegaFuseApp.cpp
Expand Up @@ -102,7 +102,7 @@ void MegaFuseApp::topen_result(int td, error e)
for(auto it = model->cacheManager.begin(); it!=model->cacheManager.end(); ++it)
if(it->second.td == td)
it->second.td = -1;
model->eh.notifyEvent(EventsHandler::TOPEN_RESULT,-1);
model->eh.notifyEvent(EventsHandler::TOPEN_RESULT,e);
}


Expand Down
4 changes: 3 additions & 1 deletion src/megafusemodel.cpp
Expand Up @@ -372,7 +372,9 @@ int MegaFuseModel::makeAvailableForRead(const char *path, off_t offset,size_t si
auto open_result = el.waitEvent();
if(open_result.result < 0)
{
printf("error while waiting for topen_result the file: %s\n",error(open_result.result)) ;
printf("error while waiting for topen_result the file: %s\n",errorstring(error(open_result.result))) ;
if(open_result.result == API_ETEMPUNAVAIL)
return -EAGAIN;
return -EIO;
}

Expand Down
8 changes: 8 additions & 0 deletions test/test.sh
@@ -0,0 +1,8 @@
touch test1.txt && ls test1.txt > /dev/null && rm test1.txt && ls *.txt 2>/dev/null || echo test 1 succesful

echo "test 2 successful"> test1.txt && echo "test2 failed" > test2.txt && mv test1.txt test2.txt && ls test1.txt 2>/dev/null|| cat test2.txt && rm test2.txt
ls *.txt 2> /dev/null && echo check failed

echo "failed failed failed failed" > test1.txt && echo "test 3 successful" > test1.txt && cat test1.txt && rm test1.txt

touch test.txt && ls test.txt >/dev/null && rm test.txt && ls test.txt 2>/dev/null || echo test 4 successful

0 comments on commit 03cc6f9

Please sign in to comment.