greyed-out folders on OSX with wrong date - macos

Had a backup fail due to power hit. Was running on OSX10.9 to a Win server (XenData LTO). Widows can see folder fine, though the date is 1984. Mac sees folder greyed-out, "get info" says folder created also in 1984. Microsoft TechNet forum sees same issue (Finder issue), but offers no solution. Is the folder hidden? how do I unhide it so I can delete it, so I can re-run this backup?

If windows can see the folder - can you access it and use it? I would say pull out the contents using windows, make a new folder / new copy of the contents and resave it.

Related

macOS: QFileIconProvider icon(QFileInfo) get icons for non-existent files

I'm trying to implement a file explorer that will display a list of remote files(stored on another network server). And I use QFileIconProvider.icon(QFileInfo) to get the file icon.
The QFileInfo is constructed from a single filename(no path information):
for example: QFileInfo fi("test.jpg");
and that works on both Windows and Linux(I tested it on a Ubuntu machine), but it doesn't work on the macOS. On macOS, I always get the warning
Path given to -[NSWorkspace iconForFile:] is not a full path.
I have checked the solution here: Qt 4.8 - QFileIconProvider, Getting icon for non-existent file (based on extension), but it's for the Windows platform.
I was able to make it work if I created a temporary file on my working directory with the same remote filename. But the temporary needs to be kept. If I deleted the temporary file after calling QFileIconProvider::Icon, I will get the warning above when the QTableView tries to display the QIcon in the UI.
Is there any working solution for my case?
Thanks all.
Since there is no "correctly" solution, I just make a workaround:
Create a temporary file for each file extension, and keep them here, only delete these temporary files when you ensure you don't need them anymore. (I choose to delete them before my app quit.
At least, it works for me.
Thanks!

File History first backup never succeeds. Nothing happens

I have an Windows box, which originally had Windows 7 installed and was later on upgraded to Windows 10.
On Windows 10 I added a 3TB hard disk for backups. I set up the new hard disc as backup target and started the first backup. This now is some days ago, but whenever I check the status I get following message: File History is saving copies of your files for the first time.
On the backup disc nothing happens. There is created a folder M:\FileHistory\username\boxname\Data, but there are no files in it.
There is just a link (for whatever reason not a button) below, to stop the backup. When I restart it, I get the same message but nothing happens.
Anybody any idea, what could be the reason or what to do?
Thanks in advance...
Finally found the solution. Keep in mind, I use a german version of windows. Hence, the menu point names may not be accurately translated.
In the control center > system and security > file history > extended settings
There is a link to the event viewer related to backup events.
It had some messages telling it could not save a file in a given folder. Deleting the folder, and also the BACKUP-DRIVE:\FileHistory folder on the backup drive solved the issues.

Opening a CHM file produces: "navigation to the webpage was canceled"

I am trying to open a .chm file.
I downloaded the source, extracted it, and double clicked on Waffle.chm and clicked "Open" but no matter what element in the chm file I click, I get the message:
Navigation to the webpage was canceled.
What you can try:
Retype the address.
What's going on here?
Summary
Microsoft Security Updates 896358 & 840315 block display of CHM file contents when opened from a network drive (or a UNC path). This is Windows' attempt to stop attack vectors for viruses/malware from infecting your computer and has blocked out the .chm file that draw data over the "InfoTech" protocol, which this chm file uses.
Microsoft's summary of the problem: http://support.microsoft.com/kb/896054
Solutions
If you are using Windows Server 2008, Windows 7, windows has created a quick fix. Right click the chm file, and you will get the "yourfile.chm Properties" dialog box, at the bottom, a button called "Unblock" appears. Click Unblock and press OK, and try to open the chm file again, it works correctly. This option is not available for earlier versions of Windows before WindowsXP (SP3).
Solve the problem by moving your chm file OFF the network drive. You may be unaware you are using a network drive, double check now: Right click your .chm file, click properties and look at the "location" field. If it starts with two backslashes like this: \\epicserver\blah\, then you are using a networked drive. So to fix it, Copy the chm file, and paste it into a local drive, like C:\ or E:. Then try to reopen the chm file, windows does not freak out.
Last resort, if you can't copy/move the file off the networked drive. If you must open it where it sits, and you are using a lesser version of windows like XP, Vista, ME or other, you will have to manually tell Windows not to freak out over this .chm file. HHReg (HTML Help Registration Utility) Utility Automates this Task. Basically you download the HHReg utility, load your .chm file, press OK, and it will create the necessary registry keys to tell Windows not to block it. For more info: http://www.winhelponline.com/blog/fix-cannot-view-chm-files-network-xp-2003-vista/
Windows 8 or 10? --> Upgrade to Windows XP.
"unblocking" the file fixes the problem. Screenshot:
Win 8 x64:
just move it to another folder or rename your folder (in my case: my folder was "c#").
avoid to use symbol on folder name. name it with letter.
done.
In addition to Eric Leschinski's answer, and because this is stackoverflow, a programmatical solution:
Windows uses hidden file forks to mark content as "downloaded". Truncating these unblocks the file. The name of the stream used for CHM's is "Zone.Identifier". One can access streams by appending :streamname when opening the file. (keep backups the first time, in case your RTL messes that up!)
In Delphi it would look like this:
var f : file;
begin
writeln('unblocking ',s);
assignfile(f,'some.chm:Zone.Identifier');
rewrite(f,1);
truncate(f);
closefile(f);
end;
I'm told that on non forked filesystems (like FAT32) there are hidden files, but I haven't gotten to the bottom of that yet.
P.s. Delphi's DeleteFile() should also recognize forks.
The definitive solution is to allow the InfoTech protocol to work in the intranet zone.
Add the following value to the registry and the problem should be solved:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000001
More info here: http://support.microsoft.com/kb/896054
Go to Start
Type regsvr32 hhctrl.ocx
You should get a success message like:
" DllRegisterServer in hhctrl.ocx succeeded "
Now try to open your CHM file again.
other way is to use different third party software. This link shows more third party software to view chm files...
I tried with SumatraPDF and it work fine.
I fixed this programmatically in my software, using C++ Builder.
Before I assign the CHM help file, Application->HelpFile = HelpFileName, I check to see if it contains the "Zone.Identifier" stream, and when it does, I simply remove it.
String ZIStream(HelpFileName + ":Zone.Identifier") ;
if (FileExists(ZIStream))
{ DeleteFile(ZIStream) ; }
There are apparently different levels of authentication. Most articles I read tell you to set the MaxAllowedZone to '1' which means that local machine zone and intranet zone are allowed but '4' allows access for 'all' zones.
For more info, read this article:
https://support.microsoft.com/en-us/kb/892675
This is how my registry looks (I wasn't sure it would work with the wild cards but it seems to work for me):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"UrlAllowList"="\\\\<network_path_root>;\\\\<network_path_root>\*;\\ies-inc.local;http://www.*;http://*;https://www.*;https://*;"
As an additional note, weirdly the "UrlAllowList" key was required to make this work on another PC but not my test one. It's probably not required at all but when I added it, it fixed the problem. The user may have not closed the original file or something like that. So just a consideration. I suggest try the least and test it, then add if needed. Once you confirm, you can deploy if needed. Good Luck!
Edit: P.S. Another method that worked was mapping the path to the network locally by using mklink /d (symbolic linking in Windows 7 or newer) but mapping a network drive letter (Z: for testing) did not work. Just food for thought and I did not have to 'Unblock' any files. Also the accepted 'Solution' did not resolve the issue for me.
Moving to local folder is the quickest solution, nothing else worked for me esp because I was not admin on my system (can't edit registery etc), which is a typical case in a work environment.
Create a folder in C:\help drive, lets call it help and copy the files there and open.
Do not copy to mydocuments or anywhere else, those locations are usually on network drive in office setup and will not work.

.chm files in a VM won't display

I'm running Win7 in Parallels on a MacBook Pro. HTML help files (.chm) will not open, I get the "Navigation to the webpage was canceled" message. The files are not tagged as blocked in properties.
I've seen (but not tried) some registry entries that purport to solve the issue on a file-by-file or folder basis. I'm hoping for a more global solution.
Windows may be regarding the location of the .chm files as being on a network drive. There's a link to a program called HHReg on this page: http://social.msdn.microsoft.com/Forums/en-US/devdocs/thread/ef2b95e0-4198-4e1a-b876-314a23348b5e
After a while trying to fix this problem i noticed that my .chm files would not open if inside a folder (or full path) that contains the character #
I'm using Windows 7

Eclipse workspace as htdocs in XAMPP not working in Mac?

I've bought a MacBook Air(I've been converted from a PC guy to a Mac) today and I have recently installed XAMPP and Eclipse for Mac and I try to set the workspace for Eclipse as the htdocs folder in XAMPP. I always get the warning:
Workspace in use or cannot be created, choose a different one!
The directory i try to set is /Applications/XAMPP/htdocs
I've been trying to set an another directory it works fine as long as it is not the one above. What have I done wrong? I want the directory above. Pls. help
The solution is this:
Go into the htdocs folder and hit CMD+I to bring up the "Get Info" window
In this window, go to the bottom right and click on the padlock icon, enter your password to unlock the permissions settings in the window
You'll see a list of users and their respective permissions. Change the "admin"'s permission to "Read & Write"
Click the padlock once more to save your changes and lock the permissions for the htdocs folder
Start up Eclipse and then select htdocs as your workspace, and
Voila! You're done.
Hope that helps.
It's likely a permissions issue. The application may not be requesting admin rights to write to (or in some way control) that directory, it may just be silently failing. Generally, you need to supply admin rights to modify anything under /Applications/.
I wouldn't recommend using /Applications/XAMPP/htdocs/ as your workspace anyway. Your workspace should either be in your home directory (Documents or perhaps even Library though the former would be more intuitive), or in some other shared location if multiple users need to access it. Bundling it with the application itself would risk losing the data during an application upgrade, or in some other way confusing the issue.
Why do you want your data in the /Applications/ directory?
The problem here is that this workspace is locked. The quick solution is to delete /Applications/XAMPP/htdocs/.metadata/.lock
The slightly longer solution is to try the following command whenever such a situation occurs:
find /Applications/XAMPP/htdocs -name "lock" -exec echo {} \;
This will show you any file in that directory that has lock in the name. Remember that hidden files start with a . (such as .lock or .metadata).
The even longer answer is that /Applications is outside of the userspace and should not be used for user documents (like code files). These should ideally be moved to somewhere in /Users or into a directory specifically created for this purpose (such as /home or /shared). I'm particularly fond of having a /Users/Shared directory for sharing files between accounts.

Resources