can not save microsoft office files

105 views
Skip to first unread message

ElvisCheng

unread,
May 13, 2016, 1:43:00 AM5/13/16
to OSXFUSE


I am using osxfuse to develop a network disk with our service, when I open a office file in my disk, it will appear this error as below:



I don't have direction to solve this error. who can give some comments?

thanks 







arritje nof

unread,
May 15, 2016, 8:48:58 AM5/15/16
to OSXFUSE
Hi,

Do you see this error when issuing a "Save" action on an existing document from within Word, as opposed to a "Save As…" action that you would (implicitly) use on a new document?

I remeber seeing an error that might have the same origin. Note, it may as well be something entirely differrent, but you never know if it may help you into the right dirtection.

In my case it was FCP 7 throwing the error, when saving (to) an existing document. Saving (to) a new document worked fine.
It wouldn't surprise me if both application use the same (older) API for saving their documents.

I eventually found that the problem was caused by the application attempting to execute the exchange command on the existing document and a newly created temporary document, in order to perform a sort of atomic save action.
I asume exchange normally implicitly deletes the existing document, but somehow fails at doing that. As my filesystem lacked this function, so it would use the default implementation, which failed.

My solution was not to try fix it by implementing a proper exchange function, but rather implementing an exchange function that simply returns -ENOTSUP instead of the default implementation, forcing FCP7 to use an alternate method for saving the file.
This worked great.

Hope this helps,

ElvisCheng

unread,
May 15, 2016, 9:36:03 PM5/15/16
to OSXFUSE
hi arritje,
I also suspend this was FCP throwing error and was caused by the application attempting to execute the exchange command on the existing document and a newly created temporary document, since I am newer in the filesystem programming, could you show me that you have implemented  an exchange function that simply returns -ENOTSUP instead of the default implementation, forcing FCP7 to use an alternate method for saving the file or details? now I am very headache for this~~~

ElvisCheng

unread,
May 15, 2016, 9:39:09 PM5/15/16
to OSXFUSE


On Sunday, May 15, 2016 at 8:48:58 PM UTC+8, arritje nof wrote:

arritje nof

unread,
Sep 14, 2016, 8:55:32 AM9/14/16
to OSXFUSE
I'm sorry for the late reply. Checking my code, i just noticed that i've actually created an implementation in the mean time.
It looks something like this:

static int
yourfs_exchange
(const char *path1, const char *path2, unsigned long options)
{
        int err = 0;
        char * exchangeFromPath, * exchangeToPath;
 
        /*
          Your path-crunching code here ...
 
          After this, exchangeFromPath and exchangeToPath
          contain valid paths.
         */
 
        err = exchangedata(exchangeFromPath, exchangeToPath,(unsigned int)options) == 0 ? 0 : -errno;
        return err;
}


The `empty` implementation that you probably were interested in, looked like this:

static int
yourfs_exchange
(const char *path1, const char *path2, unsigned long options)
{
       
return -ENOTSUP;
}


Hope this can still be of help to anyone, eventhough half a year late..


kind regards,
Arjen
Reply all
Reply to author
Forward
0 new messages