Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mr Shiny Pants
Nov 12, 2012
NTFS3g for Linux will happily remove that. We had the same on one of our fileservers. Explorer would hang if you would try to delete the file, popped in a livecd and it deleted it no fuss.

Adbot
ADBOT LOVES YOU

Dr. Arbitrary
Mar 15, 2006

Bleak Gremlin
The subst command can map a folder to a drive, which might reduce the number of characters.

Fergus Mac Roich
Nov 5, 2008

Soiled Meat

Carbon dioxide posted:

Delete it from Linux. A live cd/usb, or if you're on windows 10 you can just use the Linux Subsystem for Windows to do so.

Or, if you're on a 32-bit version of windows you should be able to start the ancient 16-bit command.com commandline (not to be confused with the modern 32-bit cmd.exe). Command.com only supports 8.3 filenames, so filename length shouldn't be a problem for it.

Just use dir /X and delete the file using 8.3 filename that command gives you.

I guess I'm not really sure if that works because I was able to use it just now to *make* a directory that Explorer and mkdir were refusing to create, but Explorer happily deleted it anyway. This is Windows 10.

fritz
Jul 26, 2003

Honest opinion here, ask Raymond Chen, we might get a blogpost out of it.

redleader
Aug 18, 2005

Engage according to operational parameters
You could use Window's long/weird path name syntax:
code:
del "\\?\c:\path_to_bigass_file_name.tiff"

AIUI the \\?\ stops Windows from interpreting the file name in any way, and makes the OS throw the file straight to the file system layer.

See Cause 6. It works with long file names as well ones with invalid characters.

Hargrimm
Sep 22, 2011

W A R R E N

Fergus Mac Roich posted:

Just use dir /X and delete the file using 8.3 filename that command gives you.

I guess I'm not really sure if that works because I was able to use it just now to *make* a directory that Explorer and mkdir were refusing to create, but Explorer happily deleted it anyway. This is Windows 10.

dir /X doesn't even give me a shorter filename for that particular file, just blank




redleader posted:

You could use Window's long/weird path name syntax:
code:
del "\\?\c:\path_to_bigass_file_name.tiff"
AIUI the \\?\ stops Windows from interpreting the file name in any way, and makes the OS throw the file straight to the file system layer.

See Cause 6. It works with long file names as well ones with invalid characters.

code:
U:\Downloads>del "\\?\u:\downloads\15 - Phyllis' Wedding_2_3_4_5_6_7_8_9_10_11_12_13_14_[...]_78.mkv"
The filename or extension is too long.

Carbon dioxide posted:

Delete it from Linux. A live cd/usb, or if you're on windows 10 you can just use the Linux Subsystem for Windows to do so.

Guess I will have to give this a try. Obviously this happened before the Win 10 subsystem was a thing. I believe I tried doing it through Cygwin at the time, without any success.

nielsm
Jun 1, 2009



Hargrimm posted:

dir /X doesn't even give me a shorter filename for that particular file, just blank




code:
U:\Downloads>del "\\?\u:\downloads\15 - Phyllis' Wedding_2_3_4_5_6_7_8_9_10_11_12_13_14_[...]_78.mkv"
The filename or extension is too long.

I think Total Commander lets you CD to a \\?\ path and navigate and manipulate things that way.

Beef
Jul 26, 2004
Deleting using the DOS abbreviation worked for me the last time I had an invalid filename:

> del CHARIS~1.M4A

canis minor
May 4, 2011

You should be able to rename it using wildmarks - for example: rename *.mkv 1.mkv (of course if it's the only mkv file in the dir)

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Blue Footed Booby posted:

Maybe I'm being dense but...what game is it? I don't follow the mock threads so I have no idea what stupid otaku bullshit has entered goon collective awareness recently.
Google says it's probably this thing: https://en.wikipedia.org/wiki/Yandere_Simulator

Beef posted:

Deleting using the DOS abbreviation worked for me the last time I had an invalid filename:

> del CHARIS~1.M4A
That's a different file.
Not everything is guaranteed to have a 8.3 filename in NTFS.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.
Speaking of filesystems, Explorer refuses to move one of my work folders because "the path is too long". Hmm what could possibly be too long-

quote:

C:\Work\Client1\Training\workspace\webapp-workspace\src\main\webapp\app\flat\node_modules\bower-installer\node_modules\bower\node_modules\bower-registry-client\node_modules\request\node_modules\combined-stream\node_modules\delayed-stream\test\integration

Oh.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



It's hilarious that that is still a problem in 2017.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Powaqoatse posted:

It's hilarious that that is still a problem in 2017.

yes, but it is also hilarious that someone would look at "main\webapp\app\flat\node_modules\bower-installer\node_modules\bower\node_modules\bower-registry-client\node_modules\request\node_modules\combined-stream\node_modules\delayed-stream\test\integration" and say "yes, this is fine"

omeg
Sep 3, 2012


(The Word one says "There's a serious disk error in that file").

Filesystems are fun. As for long paths, the Unicode windows API handles them just fine, it's just UI programs that are poo poo. I can't believe loving Explorer still trips on that.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

omeg posted:

Filesystems are fun. As for long paths, the Unicode windows API handles them just fine, it's just UI programs that are poo poo. I can't believe loving Explorer still trips on that.
I imagine Explorer is stuck with their 9x era APIs to not risk collapsing the house of cards of shell extensions and third-party software full of hacks and undocumented assumptions that sits on top of it.

smackfu
Jun 7, 2004

Within the last year, I ran into a commercial encryption API that used a fixed length buffer when you encrypted a file. So if the path you passed was longer than 160 chars, it crashed. The official workaround was to "move it to a directory with a shorter path." Terrifying.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

SupSuper posted:

Speaking of filesystems, Explorer refuses to move one of my work folders because "the path is too long". Hmm what could possibly be too long-


Oh.

Stop using npm 2.

bigmandan
Sep 11, 2001

lol internet
College Slice

Hargrimm posted:

This happened with a poorly-programmed downloader I was using years ago. I have a zip file named Episode 12 - Foo_01_02_03_04... and so on. The filename is so long I have been completely unable to find any way of deleting, renaming, or moving it through windows or any application. It's been camping in my Downloads folder since 2010.

I've had similar issue in the past with long file names or invalid file names (created by a Linux OS). Try using robocopy to mirror an empty directory on top of directory that contains the file. You'll need to use the /MIR or /PURGE option. You'll want everything else important out of that directory first before you do this...

bigmandan fucked around with this message at 15:46 on Feb 28, 2017

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

smackfu posted:

Within the last year, I ran into a commercial encryption API that used a fixed length buffer when you encrypted a file. So if the path you passed was longer than 160 chars, it crashed. The official workaround was to "move it to a directory with a shorter path." Terrifying.
It's depressingly common in windows code to see string buffers that are presized to MAX_PATH, which aren't even file paths.

ThisIsNoZaku
Apr 22, 2013

Pew Pew Pew!

SupSuper posted:

I imagine Explorer is stuck with their 9x era APIs to not risk collapsing the house of cards of shell extensions and third-party software full of hacks and undocumented assumptions that sits on top of it.

This is (or was) literally true: https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost-the-api-war/

My favorite part is the sim city exception in Windows.

(For anyone who doesn't read the article, the original DOS Sim City would read certain memory after freeing it, which worked in DOS, but in Windows the OS would see the memory is free and do something else with it, causing Sim City to crash. So the Windows team added special handling to the memory allocator to detect when Sim City was running and avoid reclaiming that particular memory after it was freed.)

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Hammerite posted:

yes, but it is also hilarious that someone would look at "main\webapp\app\flat\node_modules\bower-installer\node_modules\bower\node_modules\bower-registry-client\node_modules\request\node_modules\combined-stream\node_modules\delayed-stream\test\integration" and say "yes, this is fine"

Nobody looked at it, they just installed poo poo with npm, and the people who made they stuff they installed installed poo poo with npm, etc and now woops, this is hosed up.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Powaqoatse posted:

It's hilarious that that is still a problem in 2017.

On that note https://github.com/mishoo/UglifyJS2/issues/1516 broke our QA environment today :toot:

VikingofRock
Aug 24, 2008




I'm still always surprised when I remember that most unixes have a max path length of 4096 characters. Not that I've ever run into it, but that seems like the sort of thing we should be able to handle better nowadays, you know? Like is it really gonna slow things down so much if we put paths on the heap?

Edison was a dick
Apr 3, 2010

direct current :roboluv: only

VikingofRock posted:

I'm still always surprised when I remember that most unixes have a max path length of 4096 characters. Not that I've ever run into it, but that seems like the sort of thing we should be able to handle better nowadays, you know? Like is it really gonna slow things down so much if we put paths on the heap?

:shrug: that's what happens when your kernel initially had that constraint, so lazy programmers don't work out how to retry the syscall with a bigger buffer, and then you can't change it because you don't want to rewrite your whole userland, and now it's impossible to change because of all the code that depends on that code and all the new programmers making the same old mistake.

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

Powaqoatse posted:

It's hilarious that that is still a problem in 2017.

You can enable longer paths in Windows 10. You have to go out of your way to do it currently but it's the first thing I do on a fresh install.

Mr Shiny Pants
Nov 12, 2012

ThisIsNoZaku posted:

This is (or was) literally true: https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost-the-api-war/

My favorite part is the sim city exception in Windows.

(For anyone who doesn't read the article, the original DOS Sim City would read certain memory after freeing it, which worked in DOS, but in Windows the OS would see the memory is free and do something else with it, causing Sim City to crash. So the Windows team added special handling to the memory allocator to detect when Sim City was running and avoid reclaiming that particular memory after it was freed.)

I wonder how many things they did like this that still bite them in the rear end regularly. Special code paths are a special place in hell.

canis minor
May 4, 2011

Munkeymon posted:

On that note https://github.com/mishoo/UglifyJS2/issues/1516 broke our QA environment today :toot:

This reminds me that JSmin used to change a++ +1 to a+++1

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Drastic Actions posted:

You can enable longer paths in Windows 10. You have to go out of your way to do it currently but it's the first thing I do on a fresh install.

i was gonna say, windows has some absurdly shallow maxpath too.

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun
Imagine, if you will, a list, selecting locations in something we care about

Python code:
a_cool_list = [2, 9, 84, 1021, 69, 89]
(this order is important)

Now imagine another list, referring to indexes of that list.

Python code:
a_bad_list = [1, 4]
Later on, you decide that you want to regenerate a_cool_list. But you just love lists, so you decide you have to two lists.

Python code:
first_list = [2, 9, 84, 1021]
second_list = [69, 89]
Now imagine somebody decided to use a_bad_list's values as indexes for first_list and second_list.

:suicide:

In a way that will never crash and alert you to this kind of madness.

:suicide: :suicide:

Pollyanna
Mar 5, 2005

Milk's on them.


I cannot comprehend why you would ever do that.

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun

Pollyanna posted:

I cannot comprehend why you would ever do that.
You're allergic to dictionaries.
You think it'll fix the problem and that's all you've considered.
Right hand doesn't know what left hand is doing.

Take your pick

Ghost of Reagan Past fucked around with this message at 23:14 on Mar 1, 2017

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
The very first time I ever tried to implement sorting, I made an array of data to be sorted, and then an array of indexes of that data, and I tried to sort the indexes based on the data that they pointed to. I greatly confused myself, then I confused the teacher when I tried to explain what I was doing, then I reimplemented the sort properly in much less space and like half an hour.

Anyway, your sordid story kind of reminds me of that -- a high-school-age kid learning about manipulating arrays for the first time and not really understanding what they were doing.

canis minor
May 4, 2011

Why are APIs of shipping providers so crappy? International company, millions of clients, yet they can't handle their input properly allowing me to get this:

quote:

Internal server error

Good job!

the weight of the item I want to ship is 0

also the address doesn't exist

both are situations their API handles according to the documentation

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



canis minor posted:

Why are APIs of shipping providers so crappy? International company, millions of clients, yet they can't handle their input properly allowing me to get this:


Good job!

the weight of the item I want to ship is 0

also the address doesn't exist

both are situations their API handles according to the documentation

But do they claim to handle them at the same time???

canis minor
May 4, 2011

Powaqoatse posted:

But do they claim to handle them at the same time???

:sterv:

Also - their "brand new API" is the API of the company they took over, because everything still uses the same API calls (and some of them stopped working, ups)

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Powaqoatse posted:

But do they claim to handle them at the same time???
The better question is, how could you prove that they don't?

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Gazpacho posted:

The better question is, how could you prove that they don't?

A/B testing malformed inputs :getin:

return0
Apr 11, 2007

quote:

Please enter a password with 8-10 upper and lowercase letters and numbers. Start with a letter and avoid using consecutive, identical characters such as 11 or rr.

Explicitly disallows passwords less than 8 or greater than 10 characters in length. Does not allow non alphanumeric characters.

Absurd Alhazred
Mar 27, 2010

by Athanatos

return0 posted:

Explicitly disallows passwords less than 8 or greater than 10 characters in length. Does not allow non alphanumeric characters.

Demand that the word "password" is part of the password so our admins don't get confused.

Adbot
ADBOT LOVES YOU

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

return0 posted:

Explicitly disallows passwords less than 8 or greater than 10 characters in length. Does not allow non alphanumeric characters.

I've only seen that sort of thing on systems where the password occasionally has to be entered on a phone. The length limitation baffles me, though; I can't think of a reason for that at all.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply