NSCocoaErrorDomain error 516 caused by bringing PNG into Xcode - xcode

I am trying to import PNG images into Xcode (version 4.6.2) on my Mac. These images were created on a Windows 7 machines, and stored on a NAS box.
In finder, when I drag the images from my NAS box into Xcode I get the following error:
The operation couldn't be completed. (NSCocoaErrorDomain error 516).
Using Get Info on that file, Sharing & Permissions only states that You have custom access.
Ive managed to copy these images onto a folder on my Mac's desktop. Using Get Info on these local images, Sharing & Permissions that My User, Staff and Everybody all have Read & Write permissions. I can make copies of these images on my Mac and I can edit these images on my Mac.
When I try and drag these local images into Xcode, I still get the same NSCocoaErrorDomain 516.
EDIT:
Because I read somewhere that the extended attributes could be causing this error, I have just used a Terminal Window to copy the files using this command:
cp -X button.png button2.png
But again, this gives me the same NSCocoaErrorDomain 516.
EDIT 2:
This is getting really infuriating now. If I rename the files, the Xcode accepts the files with no problem. If I rename the file back to what it was, Xcode kicks out the NSCocoaErrorDomain 516 error again. I could go and rename the hundreds of images and change the references to them in my code, but I would really rather find out the cause of this problem.
Ive been making the images on a Windows machine and importing them into Xcode fine for the last two weeks without problem. Today I do the same thing and suddenly this problem occurs. Nothing has changed to the Windows machine or the NAS box. My Mac has not been updated, nor am I aware of any changes to my Mac.
What am I doing wrong? How can I get these images into Xcode?

From Foundation Constants Reference
NSFileWriteFileExistsError = 516
I think You have folder/file named button.png

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!

using shutil.move() I accidentally renamed my desktop folder to cat.jpg

while messing around with shutil and os modules(working on a tutorial exercise). I accidentally moved my desktop folder to an image format type called cat.jpg which doesn't exist anymore, I wasn't trying to move but I was trying to rename the image using shutil.move() when I forgot to type the image's name after its path .I actually managed to fix it after about an hour of googling I recreated a folder and named it desktop then I restored it using previous versions.However, my question is where did the image(cat.jpg) and the original desktop folder go? I searched the whole computer without finding it. here's my code:
shutil.move("c:\\users\\nate\\desktop","cat.jpg")
which output:
'cat.jpg'
I found the desktop folder in the Python folder and its named desktop.jpg but it's still an actual folder containing all the file that I had .However, when I tried to delete it, I got a message saying that the file is shared in the name cat.jpg and asking me to be sure .so anyways just wanted to tell that so anybody facing the same problem will know where to look and what to do .

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.

Mac terminal Chrome Apps.localized

For some strange reason the Applications folder for a user login has changed itself.
It seems to have created an Alias for the real Applications folder and then stuck in Chrome Apps.locaslized in the original folder of applications.
This means I can no longer access my applications via the terminal. This is inconvient as I edit the Vhosts file of MAMP this way.
Can anyone shed some light as to how this might have happened and how I can revert it back so that Applications are put back into the applications folder as they should be
I have added an image so u can see what I mean
Type in:
cd /Applications
It will take you back to your list of all apps. I don't have an explanation but after playing around with the same issue I got back to my apps folder like that.
I'm having this same problem and this is the only other instance of it I found on google. Has anyone else encountered this or found a fix? After installing MAMP my Applications folder is now at /Applications instead of /Users/[username]/Applications
/Users/[username]/Applications now only contains Chrome Apps.localized

.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

Resources