tjibbevanderlaan / chromeos-filesystem-sftp

ChromeOS app to access SFTP server
https://chrome.google.com/webstore/detail/shared-network-folder-sft/gbheifiifcfekkamhepkeogobihicgmn
BSD 3-Clause "New" or "Revised" License
82 stars 21 forks source link

Can't save a new file #45

Closed yoichiro closed 9 years ago

yoichiro commented 9 years ago

When I save a new text file with the application "Text", the file was created, but the file size is zero.

yoichiro commented 9 years ago

Probably, the cause is the follows:

  1. Require to save the new file in Text application.
  2. The onGetMetadataRequested event fired. Return "NOT_FOUND".
  3. The onCreateFileRequested event fired. Create an empty file.
  4. The onGetMetadataRequested event fired. Return "NOT_FOUND". <- Here!
  5. Then, any events not fired...

In #41, I added the cache layer. That is, in the step4, the metadata of the created new file should be returned. However, its metadata does not exist in the cache, therefore, "NOT_FOUND" returned. As the result, ChromeOS didn't fire the onFileWriteRequested or onTruncateRequested event.

yoichiro commented 9 years ago

Currently, if the specified directory was cached and the specified file doesn't exist in the cache, "NOT_FOUND" returned without fetching the metadata from the server. To solve this issue, I intend to change this logic. That is, when the situation occurs, fetch the metadata from the server and return it.

yoichiro commented 9 years ago

Fixed this issue at next version: #46

yoichiro commented 9 years ago

1.4.1 has just been released. Close this issue.