0

I use OneDrive, where each file in the relevant Windows folder is a reparse point (visible through dir /al). When I clear the Windows space for a particular file, it becomes a placeholder with the size shown in parentheses on the relevant dir output; while (obviously) remaining a reparse point. When I use the file, it comes back to disk, the parentheses disappear, but it remains a reparse point. This makes sense.

I also have an extensive Dropbox folder using SmartSync.

When a SmartSync'd file is in online only state, it is visible as a reparse point, with the files showing as placeholders with size in parentheses, and the space definitely not occupied.

When it is in local state, it is no longer a reparse point, and the file is not a placeholder.

So far so good.

However, if I use an online only file, it seems to end up in a halfway house state where it no longer shows as a reparse point; it is definitely available on disk (using space); but it still shows as a placeholder with size in parentheses.

Even worse, if I robocopy an online only file, it loses its reparse point status (because it's been used), stays a placeholder with parentheses, and lands up on the target with all its data, but marked as a placeholder with parentheses there as well (making it look worryingly as if the target might still be dependent on Dropbox for its data - though it clearly isn't, and the target file is anyway not a reparse point).

Does anyone have any explanation of all this strange Dropbox placeholder behaviour? I can't find any discussion of it on the web (though I may have missed something).

MandyShaw
  • 103

1 Answers1

1

dir shows parentheses when the file has the 'Offline' attribute (FILE_ATTRIBUTE_OFFLINE). However, that does not indicate that the file is actually a "placeholder" of any sort – it just means Dropbox forgot to unset the attribute.

It was unexpected to me, but it seems that 'Offline' can be arbitrarily set/unset on any file (even if there's no corresponding mechanism to actually make it offline) and you can even do so through the attrib program:

C:\> echo Test! > foo.txt
C:\> attrib +o foo.txt
C:\> dir foo.txt
       (7) foo.txt

Actually it might be intentional on Dropbox's part – notice that if the parent folder is changed to "Local" via Smart Sync, then Dropbox removes the 'Offline' attribute from all files as well. However, if the folder is set to "Online-only" via Smart Sync, then even downloaded files retain the 'Offline' attribute, which is perhaps supposed to mean that they're considered "temporarily cached" and Dropbox may convert them back into online-only when disk space is low.

Screenshot of Dropbox's "Automatically make files online-only" feature


Use fsutil reparsepoint query to see the "reparse tag" contents of a reparse point.

Use fsutil file layout to examine an NTFS file's structure. If it actually holds data, then the ::$DATA stream will show up as having the correct allocated size.

(Ignore the presence of ":com.dropbox.attrs:$DATA"; that's an ordinary Alternate Data Stream – an xattr – which is passive and doesn't influence filesystem behavior.)

grawity
  • 501,077