Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

WebDAV empty folders cause inability to create new files #4649

Closed
axxidental opened this issue Aug 3, 2013 · 23 comments · Fixed by adobe/brackets-shell#421
Closed

WebDAV empty folders cause inability to create new files #4649

axxidental opened this issue Aug 3, 2013 · 23 comments · Fixed by adobe/brackets-shell#421

Comments

@axxidental
Copy link

Using a WebDAV network drive, if you select an empty folder in the tree, it gives the error message:

image

After dismissing the message, if you right click in the tree and try to create new file or new folder anywhere in the tree, nothing happens.

A refresh of the tree (right click->refresh from within the tree) does not resolve it, but refreshing the application (F5) does, so long as you don't click an empty folder.

As a note, this behavior does not occur using local disks. The webdav is mapped/mounted as a local disk via NetDrive.

@RaymondLim
Copy link
Contributor

@axxidental
It seems like you don't have read access to that specific folder. Have you tried to open that folder in Windows Explorer?

@axxidental
Copy link
Author

Yep, all works well in Windows Explorer, and if I create a file in that
folder in Windows Explorer, after the refresh, selecting the folder does
not produce the error.

Seems strange that it should act this way. I'll try it from another
computer on Monday and see if it has the same results on a different
machine.

On Sat, Aug 3, 2013 at 11:23 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental
It seems like you don't have read access to that specific folder. Have you
tried to open that folder in Windows Explorer?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4649#issuecomment-22067068
.

@ghost ghost assigned RaymondLim Aug 5, 2013
@RaymondLim
Copy link
Contributor

@axxidental Can you reproduce the issue on another machine? Do you remember how (and when) you created the problematic folder?

@axxidental
Copy link
Author

I was overly busy yesterday, I'll try it now give me an hour to set up the
webdav on this machine.

On Mon, Aug 5, 2013 at 11:45 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental Can you reproduce the issue
on another machine? Do you remember how (and when) you created the
problematic folder?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4649#issuecomment-22159604
.

@axxidental
Copy link
Author

Happens on both of my other computers here, in both Sprints 27 and 28.

Steps to reproduce:

  1. Connect to a WebDAV drive, map to a drive letter (used N:, P:, and Y:)
  2. Launch Brackets and do file->open folder, locating a folder on the drive.
  3. Select any empty folder within that folder in the tree and receive the
    error message. (any empty folder, even a brand new created one)
  4. Attempt to right click->new file in the tree and nothing happens (no
    error message, nothing at all)
  5. Right click->refresh and ability to create new files returns
  6. Clicking empty folder again would recreate the problem again, requiring
    another refresh.

Each PCs is quite different too, one is a custom built box running Windows
8 Ultimate, one is an HP laptop running Win7 Enterprise, the last is an
older HP desktop running Windows XP.

Hope this helps, let me know if I can provide any other information.

On Tue, Aug 6, 2013 at 8:42 AM, Chris Riedel cdriedel@gmail.com wrote:

I was overly busy yesterday, I'll try it now give me an hour to set up the
webdav on this machine.

On Mon, Aug 5, 2013 at 11:45 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental Can you reproduce the issue
on another machine? Do you remember how (and when) you created the
problematic folder?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4649#issuecomment-22159604
.

@RaymondLim
Copy link
Contributor

@axxidental Thanks for your testing and providing more info. One question to clarify that I understand your steps correctly. Are you done with "Open Folder" dialog after step 2 or after step 3? In other words, your selection of an empty folder in step 3 is in the "Open Folder" dialog or do you mean clicking on an empty folder in the side bar?

Also, can you try with sprint 26 build and see you can reproduce with it?

@axxidental
Copy link
Author

Sorry, that was vague. I am done with open folder dialog after step 2, the
error occurs upon selecting an empty folder in the brackets tree, not the
open folder dialog.

Same problem in Sprint 26.

To make it more interesting, if you select an empty folder in the open
folder dialog, the error happens upon selecting folder, and then the tree
shows only the dropdownlist and a "Loading..." label below it.

On Tue, Aug 6, 2013 at 10:41 AM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental Thanks for your testing and
providing more info. One question to clarify that I understand your steps
correctly. Are you done with "Open Folder" dialog after step 2 or after
step 3? In other words, your selection of an empty folder in step 3 is in
the "Open Folder" dialog or do you mean clicking on an empty folder in the
side bar?

Also, can you try with sprint 26 build and see you can reproduce with it?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4649#issuecomment-22192817
.

@peterflynn
Copy link
Member

It seems like there's a generic issue here with the tree code not being very robust to file IO errors, also. If there's an error lazy-loading a subfolder of a larger project (as seems to be the case here), the tree shouldn't get into a borked state where subsequent operations silently fail with no feedback...

@RaymondLim
Copy link
Contributor

@axxidental
I think I have a fix for you, but since I can't reproduce with our network drive I need you to get my version of Brackets.exe to test with your WebDAV drive. You can get my private version from https://dl.dropboxusercontent.com/u/101232385/4649/Brackets.exe
Since my version is based on the new CEF used in sprint 30, you may also need to get a sprint 30 first and then replace the .exe with mine. There is a sprint 30 build posted here.

@axxidental
Copy link
Author

The bug that was preventing new files from being created without a refresh
seems to be fixed, however, it still throws an error if you select an empty
folder when using "open folder" or when selecting an empty folder in the
tree.

If you select an empty folder from the "open folder" dialog, after
dismissing the error, the tree displays "Loading..." until a refresh is
performed on the tree, despite the fact that it has in fact loaded the
folder (you can create new files/folders while it still says "Loading...").
If the folder is still empty when doing the refresh, it will throw the
error again, and continue to display "Loading...". If you create a new
folder, it will also throw the error, because it will select the folder
after it is created.

Not sure why the behavior only occurs on empty folders on a WebDAV drive,
even when mapped to a drive letter. The error clearly states that the
errors was from reading the CONTENTS of the directory and not the directory
itself, but empty directories are perfectly valid, obviously. Could it
have something to do with file system differences? The WebDAV drive is on
a Red Hat (4.4.6-4) server, and I am using the Windows brackets client.

A 'df -T' on the Linux box is showing fakeroot and fakefs for file systems,
which I am unfamiliar with. The Windows boxes are all NTFS.

I will try to provide more info if needed, just let me know!

On Wed, Aug 21, 2013 at 3:14 PM, Raymond Lim notifications@github.comwrote:

@axxidental https://github.com/axxidental
I think I have a fix for you, but since I can't reproduce with our network
drive I need you to get my version of Brackets.exe to test with your WebDAV
drive. You can get my private version from
https://dl.dropboxusercontent.com/u/101232385/4649/Brackets.exe
Since my version is based on the new CEF used in sprint 30, you may also
need to get a sprint 30 first and then replace the .exe with mine. There is
a sprint 30 build posted herehttps://github.com/adobe/brackets/releases/tag/0.30.0-8785
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4649#issuecomment-23050819
.

@axxidental
Copy link
Author

brackets1
brackets2
brackets3

@RaymondLim
Copy link
Contributor

@axxidental We have a big change in Brackets file system. Can you check with sprint 36 build and let us know whether you are still having any issue?

@axxidental
Copy link
Author

Hate to say it, but its actually worse. It's giving the error now for many folders, regardless of whether or not they are empty. It is the same with both secure and unsecured protocols (HTTP/HTTPS)

@RaymondLim
Copy link
Contributor

@axxidental Sorry to hear that it's getting worse. Not sure we will be able to fix it on our end since we don't have a similar network to test with.

@jasonsanjose and @iwehrman This is similar to #6029. Do you have any suggestion of how to fix this in the new file system?

@iwehrman
Copy link
Contributor

I am skeptical that it is related to #6029. This is on Windows, right? Are there any errors or message in the console?

@axxidental
Copy link
Author

Nope, nothing in the console.

@iwehrman
Copy link
Contributor

I wonder if we can narrow down the problem within the filesystem. What happens if you enter the following in the console?

  1. FS = require("filesystem/FileSystem")
  2. d = FS.getDirectoryForPath("N:/your/empty/webdav/folder")
  3. d.stat(console.log.bind(console))
  4. d.getContents(console.log.bind(console))

@axxidental
Copy link
Author

brackets

@iwehrman
Copy link
Contributor

Great! This is really helpful. My guess is that this bug lies somewhere within the native shell that performs the actual I/O. If you have a chance, could you do one more follow-up test in the console to help confirm this?

  1. appshell.fs.stat("N:/your/empty/webdav/folder", console.log.bind(console))
  2. appshell.fs.readdir("N:/your/empty/webdav/folder", console.log.bind(console))

@RaymondLim or @JeffryBooher or @bchintx: it seems like there is now enough info here to try to reproduce and track down this issue with empty WebDAV-mounted directories on Windows. In particular, I think we've ruled out any relationship to #6029, which is about path normalization.

@axxidental
Copy link
Author

Glad I can help. Here is the next set. Let me know if you need any more!

brackets2

@RaymondLim
Copy link
Contributor

@axxidental Thanks for your help with @iwehrman's instructions. I think I know the real cause in the native code readdir function. It seems that we should be calling FindFirstFile with native paths (ie. using \\ path separator instead of unix file path separator /) in order to read network drive correctly.

@axxidental
Copy link
Author

@RaymondLim That is great news! If you want me to test an executable again, just let me know!

@JeffryBooher
Copy link
Contributor

@axxidental we've fixed this issue which is available to build from master now or test in the next release of Brackets. Thanks for finding!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants